Link to home
Start Free TrialLog in
Avatar of sjterrell
sjterrellFlag for United States of America

asked on

ColdFusion Sub Reports

I'm trying to drive a sub report off of a CFC that only get the data needed for the subreport.

                    <cfreport template="rptWorkOrders.cfr" format="pdf" query="wolist" overwrite="yes" encryption="none" permissions="allowprinting">
                        <cfreportParam subreport="WOItemDetail" query="cfc.Application.Support.getWO2PrintItems('#param.WO#', '#session.userauth.subid#')">
           
                    </cfreport>

I get the error Element WO is undefined in PARAM.  WO is the name of the param defined on the main report to be passed to the subreport.

Basically I  have a query (WOLIST) that drives the main report; for each report, I need to print a sub report with just the items related to the parent report, the field on the cfr that links the two is called wo.  I want to use that to call a cfc on the subreport for the query to drive the subreport.
Avatar of gdemaria
gdemaria
Flag of United States of America image

param is not an available coldfusion scope.    It is possible that param can be a structure or it can be the name of a query, that would make param.wo a valid variable.   Otherwise, it is not a valid scope.

The question is where did the value param.wo come from?    How is it passed into the sub report file?
Avatar of sjterrell

ASKER

If I'm not mistaken, param is the scope passed from the parent report to the sub report.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.