Upload
tracy-neal
View
212
Download
0
Embed Size (px)
Citation preview
Creating Banded Creating Banded Reports im CF using Reports im CF using
Nested <CFOUTPUT> Nested <CFOUTPUT> tagstags
Creating Banded Creating Banded Reports im CF using Reports im CF using
Nested <CFOUTPUT> Nested <CFOUTPUT> tagstags
Douglas M. SmithDouglas M. SmithApplication ArchitectApplication Architect
Automation Creations, IncAutomation Creations, Inc
What does a traditional banded report look like
• Parts are successively nested• Each part (except the detail) has a
header and a footer• Typically allowed to do domain type
calculations– Sum– Max– Min
Reports Parts• Report• Group1• Group2• GroupX• Detail
How does Grouping work in CF?
• <CFOUTPUT Query="X" Group="Y">• Only shows records where field "Y"
changes• Does not do true grouping• Does *not* sort for you• query should be sorted by the same
fields you group by, in order for the output to make sense
<CFOUTPUT>Nesting Basics
• Query must be on the outer most level
• Must be a different group, or no group to nest
• Any number of groups can be nested• <CFOUTPUT> with no options can
be in the deepest level
Report SectionsREPORT HEADER <CFOUTPUT QUERY="X" Group="1">
GROUP 1 HEADER <CFOUTPUT Group="2">
GROUP 2 HEADER <CFOUTPUT>
REPORT DETAILS </CFOUTPUT>
GROUP 2 FOOTER</CFOUTPUT>GROUP 1 FOOTER
</CFOUTPUT> REPORT FOOTER
Example• Show the books published by each
author, organized by book type• ie, group by
– type– then author– then title
Using Style Sheets effectively
• One class for each level/header/footer
• Page Breaks