|
|
Introduction
|
|
HTML-printing is meant for printing various types of
documents. The distinctive feature of this printing method is an
ease of creating report templates (it requires only a basic
knowledge of HTML).
HTML-printing is based on a principle that each document
type can have several corresponding reports, each represented by a
file with the rep extension (report template written in HTML
using keywords, links to field values and table titles).
Let's examine a typical template for Notes - notes.rep file
(supplied with GoldenSection Notes,
located in the Reports folder).
|
|
[%%ReportType=Notes%%]
[%%ReportCaption="Notes"%%]
[%%ReportDescription=" "%%]
[%%HEADER%%]
<html>
<head>
<title>%%ReportTitle%%</title>
<META http-equiv=Content-Type content="text/html; charset=%%Charset%%">
</head>
<BODY bgcolor=#FFFFFF leftmargin=5 topmargin=5 rightmargin=5 bottommargin=5>
<FONT size=2 color=#000000 face="Arial">
%%ImgCaption%%<STRONG>%%Caption%%</STRONG>
</FONT>
<hr>
#==============================================================================
[%%ROWTABLE%%]
<TABLE border=1 cellpadding=3 width="100%" cellspacing=0>
<tr bgcolor="%%BGColor%%"> <td>%%IgnoreHtmlTitle%%</td> </tr>
</TABLE>
#==============================================================================
[%%COMMENTS%%]
<TABLE border=0 cellpadding=0 cellspacing=0 width="100%" bgcolor="%%BGColor%%">
<tr><td>%%Comments%%</td></tr>
</TABLE>
#==============================================================================
[%%FOOTER%%]
</body>
</html>
|
On the basis of this template, a report of the following appearance
is generated on printing tasks:

A template consists of seven obligatory parts called sections. All
sections should go in a strictly defined order and have the
following appearance:
[%%ReportType=Notes%%]
|
|
report type |
[%%ReportCaption="Notes"%%]
|
report name |
[%%ReportDescription=" "%%]
|
report description |
[%%HEADER%%]
|
report heading |
[%%ROWTABLE%%]
|
data |
[%%COMMENTS%%]
|
comments |
[%%FOOTER%%]
|
report end |
A report type is entered after the "=" sign in the
[%%ReportType=Notes%%] section.
For Notes this line must be entered as
[%%ReportType=Notes%%] (see the full list of all sections in the
Conventions, sections and
keywords... section).
The [%%ReportCaption="Notes"%%] section - the name of a
report is entered in quotation marks after the "=" sign. On
printing, this name will appear in the Report template field
of the Report options dialog box.
The [%%ReportDescription=" "%%] section - a short
description of the report is entered in quotation marks after the
"=" sign. On printing, this will appear in the Report
description field of the Report options dialog box.

The [%%HEADER%%] section - description of a report heading.
It includes standard HTML tags and keywords required for the
creation of a report heading:
Example of the [%%HEADER%%] section:
|
|
[%%HEADER%%]
<html>
<head>
<title>%%ReportTitle%%</title>
<META http-equiv=Content-Type content="text/html; charset=%%Charset%%">
</head>
<BODY bgcolor=#FFFFFF leftmargin=5 topmargin=5 rightmargin=5 bottommargin=5>
<FONT size=2 color=#000000 face="Arial">
%%ImgCaption%% <STRONG>%%Caption%%</STRONG>
</FONT>
<hr>
|
On report generation, the %%Charset%% keyword is changed by
a codepage number. An icon of the current document appears instead
of %%ImgCaption%%. Instead of %%Caption%% you get the
name of a document.
The [%%ROWTABLE%%] section contains variable table data. For
documents of the Notes type, this is an area for the display
of note titles.
|
|
[%%ROWTABLE%%]
<TABLE border=1 cellpadding=3 width="100%" cellspacing=0>
<tr bgcolor="%%BGColor%%"> <td>%%IgnoreHtmlTitle%%</td> </tr>
</TABLE>
|
where %%IgnoreHtmlTitle%% - keyword substituted on report
generation by the value of the Title field - note title.
%%BGColor%% - keyword substituted by the value of the note
color.
The [%%COMMENTS%%] section contains a keyword
(%%Comments%%) used for outputting document comments.
|
|
<TABLE border=0 cellpadding=0 cellspacing=0 width="100%" bgcolor="%%BGColor%%">
<tr><td>%%Comments%%</td></tr>
</TABLE>
|
The [%%FOOTER%%] section describes end tags of an HTML
report template.
|
|
[%%FOOTER%%]
</body>
</html>
|
|

Copyright (c)
1999-2011 TGS Labs
|