Copy link to clipboard
Copied
I am building a report in cf report builder where there records outputed are grouped and sorted by date in the cf query
I need to be able to display the date as the grouped heading on each page, if there is a change of date in results on the same page i am wanting the sub heading for the new grouped date to appear on the page as a sub heading.
the output i am needing is the same as the output that would be generated from the following code in a cfm output
<cfoutput query="queryname" group="TransactionDate">
#TransationDate#<br>
<cfoutput>
#transationTime# , #transactiontype#, #transactionamount#
</cfoutput>
</cfoutput>
When i try and generate similar output above in cf report builder i am not able to have the TransationDate appear as the subheading once the date changes
the report simply outputs the rows containing
#transationTime# , #transactiontype#, #transactionamount#
however at the change of date there is no sub heading appearing to separate the transaction from one date to the next via a sub heading3
Adise on how to solve this would be appreciated and or reference to any examples of a cfr file that does output its results in a grouped fashion within the one page as described above
the answer to this is that you need to add the fields names as field p[aramaters so they are referenced throughout the report as query.fieldname not simply fieldname and then the reports group with the sub headings as the grouped value changes
Copy link to clipboard
Copied
You appear to have created a group on "send_date" rather than "TransactionDate" in your report definition.
Cheers
Eddie
Copy link to clipboard
Copied
Yes and it is send date thats correct the reference to transaction date was simply used as example i will edit the post so it has send data i the text
Copy link to clipboard
Copied
seens my editing option of original post are no longer present !!!! so the fact remains that the output of the cfr does not display with the sub headings as the transactiondate / senddate changes
Copy link to clipboard
Copied
I created a simple, stand-alone report that you can open in the ColdFusion Report Builder and run to see how grouping by date can work.
Cheers
Eddie
Copy link to clipboard
Copied
sorry however your sample generates the same output structure as my original
note how the date changes from 2016-09-14 to 2016-09-13 yet there is no grouped heading to separate the 2 dates into their own group as you get in the
<cfoutput query="" group="'>
<b>#DDate#</b>
<cfoutput>
#dDate# #employee#
</cfoutput>
</cfoutput>
IT simply lists the heading of the data at top of page and then all the records in date order however not inserting a grouped heading for date when it detects the new date resulting in output to be
2016-9-16
2016-9-16
2016-9-15
2016-9-15
2016-9-14
When i am needing that at the detection of change of date the date header is inserted so it clearly identifies a change in date
Copy link to clipboard
Copied
the answer to this is that you need to add the fields names as field p[aramaters so they are referenced throughout the report as query.fieldname not simply fieldname and then the reports group with the sub headings as the grouped value changes
Copy link to clipboard
Copied
j.a.c.i. wrote:
sorry however your sample generates the same output structure as my original
note how the date changes from 2016-09-14 to 2016-09-13 yet there is no grouped heading to separate the 2 dates into their own group as you get in the
There is something wrong with your setup if you are not seeing group headings. The output of the example report I provided clearly shows group headings when the date changes as shown in this screenshot of the output:
Cheers
Eddie