Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add text before a report is generated.

Status
Not open for further replies.

baserath

Technical User
Jan 25, 2002
6
US
I am new to coldfusion so please forgive me. I was wondering if there is a way to insert text into a coldfusion report before it is rendered in either flashpaper or pdf formats. I was needing a way to add a remark to a report before it was printed but the remark does not need to be stored.

The basis of my question is MS Access. My experience in access reports was that if I had a undefined in access it wouldprompt me for that data before it would generate the report and I was wondering if it is possible to do the same thing in a coldfusion reoprt.
Thanks
Shawn
 
how are you building the reports? we need details, but yes, it should be very easily possible.


 
it isn't part of the cfdocument or cfreport tags. You have to check for the data first. for example...

1 run query and set default flags
<cfset error = false>

2 check query for required data (which should be done when the data is inserted in the first place)
<cfif not len(trim(myQuery.colName))>
<cfset error = true>
<cfset errorMsg = "oops, you forgot 'colNameHere'">
</cfif>

3 check to be sure error is eq to false
<cfif not error>
display report
<cfelse>
<cfoutput>
#errorMsg#
</cfoutput>
</cfif>

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top