I have some questions regarding the ColdFusion Report builder that I’m hoping 
you can help me.  Or maybe you can point me in the direction of someone who 
might. 

The report I’m trying to build has the header area which contains summary and 
the graph contains the detail.   There can be many summaries with their 
details.   We used different approaches to build the report, but the one that 
got us closer to the results we wanted was to build the report I used 2 
queries. I’m trying to pass my variable (id) to the 2nd query to get the 
related graph. When the report is for 1 single summary/graph, I pass the id to 
my 2nd query and it works.  But when the report is for multiple summary/graph, 
only the first row selected from the 1st query will pass to the 2nd query.   
Therefore I have 1 graph with all the data retrieved for all the summaries.  It 
seams like the <cfloop> doesn’t do anything(??!!)  Another approach I tried 
was to put my graph in a subreport and pass the id as param.id, didn’t work 
either.

In case it helps, here is the code on my cfm page: 

<cfloop query="GetRpt "> 
<cfset request.getGraph = getGraph()>
<cfreport format="pdf" template=" payment_Detail.cfr"                        
permissions="AllowPrinting" Query="GetRpt " overwrite="yes"/>
<cffunction name="getGraph" returntype="query">
   <cfset var GraphQuery = ''>
      <cfquery name="GraphQuery" datasource="#request.dsn#" >
      SELECT    id , to_char(invoice_dt, 'MM/DD/RRRR') as invoice_dt
      , to_char(invoice_dt, 'RRRR/MM/DD') as sort_invoice_dt
      , TO_NUMBER(payment_line_amt,'999999999999') as payment_line_amt
      , INVOICE_LINE_AMT
      FROM     PAYMENT_DETAIL 
      WHERE    ID =#GetRpt.ID#
      ORDER BY sort_invoice_dt
      </cfquery>  
<cfreturn GraphQuery>
</cffunction>
</cfloop>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316606
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to