HOME

Products
The Arc
HTML to PDF

Free CollinsPDF.js
Free CollinsHTML.js
Free GIS

(on-line service)
CustomerCareSystem
Scripts
 

Augmented HTML REPORTING Statements

The CollinsHTML.js script Augmented HTML Reporting statements. These statements permit HTML formatted Report Writing using Records Retrieved from a database or from in-line text records. These statements permit complete client side generated reports to be sent to a server to be processed or to be processed on the client


<REPORT>...</REPORT> Begin A Report, Includes all statements between the <report> </report> tags
Macro Statements <ASSIGN> <STORE> <RANDOM> <IF> that are within the <Report>...</Report> tags
are re-processed for each record permitting sums, averages and other values to be calculated and used in the report
Setting the report style.display='none' will disable the in-line Report generation
Use a Macro Reference of {report-id} to generate reports and sub-reports.

Property Description
ID=name Tag identifier
SQL=statement SQL statement of Report Records
Table=id Reference to a <ReportTable> tag for the Report Records

Ruler=macro-ref

Set the Active Ruler based on ID as each record is processed. The macro-ref should resolve to a valid <Ruler> ID value
Width=size Report Width
Height=size Report Minimum Height


<REPORTGROUP>...</REPORTGROUP> Create A Report Group, any number of reporting group can be created
Each group requires a KEY macro reference to determine when a group change occurs
Property Description
ID=NAME Report Group identifier
PageBreakAfter="true|false" Page Break After Creating Group, Default=false
PageBreakBefore=True | False Page Break Before Creating Group, Default=false
KeepTogether=True | False If true force a page break if required to keep group detailed on the same page, Default = false
SkipIfBlank=True | False Skip Group Header / Footer if no detailed were generated, Default = false
Key=macro-ref Values to determine when the group changes as the records are read. A Macro of {F1},{F2},...{Fn} references the fields in the record by number. A Macro reference by field name is also permitted {State_Name}


<RULER>...</RULER> Detail Report Ruler containing 1 or more <Column> Statements
Property Description
Ruler=id Ruler id


<COLUMN>html-statements</COLUMN>
Define 1 or more Columns In a Ruler, each column tag contain the
HTML statements to format the cell's content. Use a Macro reference of {FIELD} for the current field value,
{Fn} to reference fields by number, or {field-name} to reference by field name. Nesting of Reports is possible
by using the <Group>...</Group> tags within the <column> html-statements. All statements within the
<group></group> tags are owned by the group and are processed only when the cell gets generated.
Property Description

Width=n

Column Width
Wrap=true | false Word wrap text in Column
Align=Left | Right | Center | Period=size Text justification of Column


<REPORTTABLE>...</REPORTTABLE>  Reporting Table of Text Comma Seperated Values (CSV) Records
Property Description
ID=id Table Identifier
Delimiter=comma | blank | tab or other Field Delimiter Default = comma
FirstRowNames = true | false Does first row of records contain field names, default = false
Src="file-spec" Report Table is a CSV File. If not specified the records are in-line
Fields="spec-list"
 
A List of Field Names and Formats contained in the table

NAME:text;
LENGTH:n;
FORMAT: char | Integer | Float;

 

Sample HTML Report from Database to PDF:

<font size=4 color=blue> <b>Sample Report With Pie Chart (bottom)</b></font>

<Report SQL="select * from President Order By Century,Position">

<ReportGroup Key={century} keepTogether=true>
<Header><BR>{first({Century})} Century</Header>
<Footer>---------------</Footer>
</ReportGroup>

<ReportDetail columns=2 order=leftright>
<Column width=20>{Position}</Column>
<Column width=120><font color=blue>{First_Name}</font></Column>
<Column width=120>{Last_Name}</Column>
<store id=list command=count name="{first({Century})}">
</ReportDetail>

<footer>
<span style="width:50"></span><font size=4> Presidents per Century<br></font>
<graphic height=300 width=300>
Pie 150,150,150,0,Black,1,solid,Black,12,,,{list.pie};
</graphic>
</footer>

</REPORT>