William, your suggestion is what I went with it initially: Here is my code:
<cfoutput> <cfloop index="i" list="#variables.list1#"> <cfif listFind(variables.list2, i)> <td align="center"><cfoutput>#getimprovedCompetence.TOTALIMPROVEDCOMPETENCE#</cfoutput></td> <cfelse> <td align="center">0</td> </cfif> </cfloop> </cfoutput Here are my lists: <cfset variables.list1 = "Agree,Disagree,Neither Agree nor Disagree,Strongly Agree,Strongly Disagree"> <cfset variables.list2 = '#ValueList(getincreasedKnowledge.INCREASEDKNOWLEDGE)#'> The problem is for the cells that are supposed to have a value, it puts ALL of the values in these cells. This is where I got stuck. >It seems illogical that a column would not exist from the query. Could you >post the query that is being run? > >As to your display issue... ><cfif structKeyExists([qName],'[colName]')> > <td>#[qName].[colName]#</td> ><cfelse> > <td>0</td> ></cfif> > >One of these per column... > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359821 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

