Copy link to clipboard
Copied
FIRST
So I have a cover page occupying the Report Builder 10, Report Header and the size is 11 x 8.5.
The Page Footer contains labels for the display of the company name, all rights...,copy right..., name of the report and date.
I'd like to display this so I know it's going to work. The cfoutput tag works only on queries...so is there a CF method to display the 'report header & page footer'?
This experiment contains a .cfm file with the query and the .cfr files, using Crimson I see the file (test1.cfm)
test1.cfm:
SELECT | tblStateProvince.State, tblStateProvince.Name, tblFacility.Name as FName, tblFacility.City, tblFacility.PostalCode, tblFacility.Address, |
tblFacility.OID,ContractNumber,ContractEffectiveDate
FROM | tblFacility INNER JOIN tblStateProvince ON tblFacility.OIDStateProvince = tblStateProvince.OID |
WHERE | (((tblFacility.OID)=37667)); |
Here is where I tried to assign the string to the 'Label' on the Report Header.
tblFacility.Name = "Yosemite Valley, LLC"
TReportStaticText104 = "#tblFacility.Name#"
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SECOND
tblFacility.OID ="#Session.#tblFacility.OID" ( originally I had this in the query, but the 'builder objected (CF 10 runs this query). why is it the 'builder' cannot resolve this assignment? )
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
THIRD
In (CFeclipse - Browser View) testing works save that it displays the query...so that means if there is no data field/tblFacility.Name designated on my cover page, I can't load the label...Right?
The "Controls" aren't something that I can program?
Do not include ColdFusion syntax in the text of the query in the Query Builder.
The error message is telling you that MS Access does not recognize the text of your query.
Note that the example code I posted must be entirely contained in a .CFM file.
Cheers
Eddie
Copy link to clipboard
Copied
The contents of your test1.cfm should look similar to the following:
<cfquery name="qryReportData">
SELECT tblStateProvince.State, tblStateProvince.Name, tblFacility.Name as FName, tblFacility.City, tblFacility.PostalCode, tblFacility.Address, tblFacility.OID,ContractNumber,ContractEffectiveDate
FROM tblFacility INNER JOIN tblStateProvince ON tblFacility.OIDStateProvince = tblStateProvince.OID
WHERE (((tblFacility.OID)=37667));
</cfquery>
<cfreport template="testReport.cfr" query="qryReportData" format="pdf">
</cfreport>
In your report, do not use a label control for non-static text. Use a field control and set the control's Expression property to query.FName and things will start to work as you expect.
Your second and third questions are probably negated by doing the above. If not, then please start a new thread with more detail of what you are trying to accomplish and what the result of your attempt is.
Cheers
Eddie
Copy link to clipboard
Copied
Thanks I'll do that!
Copy link to clipboard
Copied
Eddie CF Report Builder is giving me an error:
The error occurs when I added the <cfquery name="qryReportData"> & </cfquery>, if i remove it the query executes.
Suggestions?
Copy link to clipboard
Copied
Do not include ColdFusion syntax in the text of the query in the Query Builder.
The error message is telling you that MS Access does not recognize the text of your query.
Note that the example code I posted must be entirely contained in a .CFM file.
Cheers
Eddie