Example of creating and using a template
To create a new template, open a file with the .rep
extension in any available text editor (for example, Notepad) and
make some changes. This gives you an opportunity to customize
output reports to suit all your needs.
For example, on printing notes, to output information about the
note creation time, you need to open the notes.rep file
(C:\Program files\GoldenSection Notes\Reports\notes.rep).
Contents of the source file:
|
|
[%%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>
|
The corresponding report looks like this:

First of all, you must assign the report a new name and
description. To do this, modify text in quotations marks in the
[%%ReportCaption="Notes"%%] and
[%%ReportDescription=""%%] sections.
For example:
|
|
[%%ReportCaption="Notes with the date"%%]
[%%ReportDescription="A date of creation is output near the note title"%%]
...
|
(Here and further in the text, the red
font color indicates our modifications and additions made).
Let's modify the source file by adding a value (date and time of
creation) to the Created field in the [%%ROWTABLE%%]
section. To do this, we add a cell with a width of 140 and the
value of $$Created$$.
|
|
...
[%%ROWTABLE%%]
<TABLE border=1 cellpadding=3 width="100%" cellspacing=0>
<tr bgcolor="%%BGColor%%"> <td>%%IgnoreHtmlTitle%%</td>
<td width=140>$$Created$$</td>
</tr>
</TABLE>
#==============================================================================
[%%COMMENTS%%]
...
|
Let's rename the file, for example, to notesdate.rep
At the same time, the Notes with the date value will appear
in the Report template dropdown list of the Report
options dialog box.
In result, the report will have the following appearance:

If you make a mistake in spelling a keyword or entering a field
value, the following error message appears upon printing:
%!. . .!%
|
|
error in a keyword |
@!. . .!@
|
error in a field name |
$!. . .!$
|
error in a field value |
where ". . ." is substituted by incorrectly entered data. |