using advanced query builder for a chart
I am trying to insert a query-based chart in my report template. However, the
data is coming from a text file; thus I am creating the query object for the
chart by parsing the text file. However, the "query.name" and "query.number"
fields are not changing for each record from the original report query -- only
the first record is used. Thus the first chart on the first page is correct,
but the chart never changes for all the other pages (each page represents one
record from the query). This is what I'm putting into the advanced query
builder :
<cfset ThisQuery = QueryNew("ItemColumn,ValueColumn")>
<cfif FileExists("D:\charts\#query.name#_#query.number#. txt")>
<cfset ThisDataItem = 0>
<cfloop file="D:\charts\#query.name#_#query.number#.txt" index="ThisLine">
<cfif IsNumeric(ThisLine)>
<cfset ThisDataItem += 1>
<cfset QueryAddRow(ThisQuery)>
<cfset QuerySetCell(ThisQuery,"ItemColumn",ThisDataItem)>
<cfset QuerySetCell(ThisQuery,"ValueColumn",ThisLine)>
</cfif>
</cfloop>
</cfif>
So basically the filename is set according to first row (result) from the
report query, but then the filename (and thus the chart) never changes even
though all the other query-based fields on my page change properly (all the
other query.BlahBlah fields update correctly). Is this a bug? I didn't think I
was doing anything too crazy.
|