Dynamic Headers/Footers are what allow reports to have different grouping options, e.g. "By Location" or "By Location By System":
Note: circled above are what are called Report Definitions.
Reports can have up to three Dynamic Headers/Footers, but some reports were only coded to have one or two Dynamic Groups. Proposal reports are the only ones coded to have three levels as shown below:
Naming is key here. When named specifically, a Group Header/Footer becomes dynamic.
We have background coding that looks for headers/footers with these specific names: GrpDynamicHeader1, GrpDynamicHeader2, GrpDynamicHeader3, GrpDynamicFooter1, GrpDynamicFooter2, GrpDynamicFooter3.
The Text Box controls must also be named specifically.
In the Headers there are two fields, one that displays the name of the chosen grouping and one that displays the description field for the grouping.
We have background coding that looks for text boxes with these specific names in each respective dynamic grouping: txtDynamicHeader1, txtDynamicDesc1, txtDynamicHeader2, txtDynamicDesc2, txtDynamicHeader3, txtDynamicDesc3.
The description text box only applies to Location or System descriptions.
In the example below, a Proposal with Images report was run "By System By Location" and displays the description for just the Location:
In the Footers there is one field that displays the name of the grouping.
We have background coding that looks for text boxes with these specific names in each respective dynamic grouping: txtDynamicFooter1, txtDynamicFooter2, txtDynamicFooter3.
In the example below, a Proposal with Images report was run "By Location By System".