Web Database Application Specialists

CDS Banded Report Writer

HTML Template Description

Layout Commands

 

Command

Description

 

GroupHeaderN

Specifies the “control break” – up to 10 can be specified for a report.  Note that “GroupHeaderN” must come before “GroupHeaderN-1”.  Also note that “control breaks” can only be made for single fields.  If a “control break” is needed for multiple fields, these fields can be combined into a single field in the query for the report.

 

Detail

Specifies the start of the “Detail” band

 

GroupFooterN

Specifies to the “footer” for the corresponding “Group Header” Note that “GroupFooterN” must come after “GroupFooterN-1”. In “footer” bands, numeric fields can be summed by placing the word “SUM “ prior to the field name in the “merge field”

 

ReportFooter

Specifies the start of the “Report Footer”.  Note that this command is required, and the system needs to be able to recognize where the report ends

Special Merge Fields

 

Command

Description

 

[Subtitle]

Displays the “Report Subtitle” entered on the “Filter” form

 

[Date]

Displays the date in the format “mm/dd/yyyy”

 

SUM

Any ‘merge field’ or “command” beginning with “SUM “ is considered to be a calculation that sums the specified field

  

SUM CNT

Used to display the count of the number of records read for each “control break”

Merging Run-time variables

Runtime variables be included in a report by setting up session variables and enclosing the session variable's name between double braces (e.g.,  {{CurrentYear}})

Field Formatting

Numeric fields can be formatted by including the format specifications within the “merge field”.  When doing this, make sure that the field name and format specifications are separated with a comma (e.g., <<fieldn,$2>>).  Allowable formatting characters include

  • “$” (which will be printed to the left of the number)
  • a number (0-9) specifying the number of decimal points (if any number is specified, commas will be used when displaying numbers over 999)
  • “Boolean values for “logical fields” in the format “L:tt;ff”, where “tt” specifies the text for “true” and “ff” specifies the text for “false” (Note: Use “L:X;” to display “X” for true and nothing for false.)
  • Values for “Radio Buttons” in the format R:Value1;Value2;…, where the field is numeric with values 1-n
  • “date masks” for date fields: M = month in one or 2 digits, MM=Month in 2 digits, MMM=month abbreviation upper case, mmm = month abbreviation, first letter caps, d = day in one or two digits, dd = day in two digits, yy = year in 2 digits, yyyy = year in for digits.

HTML Report Layout Considerations

Where possible, the report elements (with the exception of the report title) should be placed in a table.  The width of this table should be set to 660 pixels (or less).  Although the report will not cover the entire screen, this allows the report to be printed from a Web browser without losing and data and without needing to change the “paper size” to “Landscape” in the “Print Setup” option of the browser.  (Note – because the HTML specifications use “merge fields” to indicate where data is placed, the developer may need to set the “paper size” to “Landscape” in order to print the HTML layout specification.)

If any “command” or “merge field” has any HTML code associated with it, the entire “command” (including the “[[“ and “]]”) or “merge field (including the “<<” and “>>”) must have the same HTML formatting