Has anyone here successfully passed a query object into the report builder
via the cfreportparam tag?
I've got the following code snippet:
<cfreport name="myReport" format="PDF" template="#reporttemplate#"
query="#ReportData#">
<cfreportparam name="advisor" value="#advisor.Description#">
<cfreportparam name="AdvisorAddressLine1"
value="#advisor.AddressLine1#">
<cfreportparam name="AdvisorAddressLine2"
value="#advisor.AddressLine2#">
<cfreportparam name="AdvisorAddressLine3"
value="#advisor.AddressLine3#">
<cfreportparam name="FullName" value="#personalData.FirstName#
#personalData.LastName#">
<cfreportparam name="AccountType"
value="#personalData.AccountTypeDescription#">
<cfreportparam name="AccountNumber"
value="#personalData.AccountNumber#">
<cfreportparam name="CompanyName" value="#personalData.CompanyName#">
<cfreportparam name="PortfolioAddressLine1"
value="#personalData.AddressLine1#">
<cfreportparam name="CityStateZip" value="#personalData.City#,
#personalData.State# #personalData.ZipCode#">
<cfreportparam name="AssetClassTotals" value="#AssetClassStruct#">
<cfreportparam name="PortfolioCashInvested"
value="#PortfolioCashInvested#">
<cfreportparam name="PortfolioCostBasis" value="#PortfolioCostBasis#">
<cfreportparam name="PortfolioCurrentValue"
value="#PortfolioCurrentValue#">
<cfreportparam name="PortfolioPercentDollarGain"
value="#PortfolioPercentDollarGain#">
<cfif form.SelectedReport eq 2>
<cfreportparam chart="AssetAllocation" query="#AssetAllocation#">
</cfif>
</cfreport>
I've gotten this much from the online documentation, however I don't know
what to do inside the report builder to complete this process. I run the
chart control wizard several times, and it seems that you either have to
specify all the labels and values upfront, or you can build a query from
within the report builder.
My problem is that my query is hand built using the QueryNew(),
QueryAddRow() and QuerySetCell() functions. The data contained in this query
object doesn't exist in the database, but rather has to be calculated on the
fly. So each time a report is run, my calling CFM page makes these
calculations, and stores them in this query object. I'm storing them in a
query object specifically for charting purposes.
I've been fiddling with this for a couple of days now, and I'm just not
getting anywhere. I'd really appreciate any help I could get.
Thanks heaps,
Chris
--
http://cjordan.us
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290190
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4