Create the files to support the new "Users" report template. The template involves a
report design with two variables: a string field and a numeric field.
About this task
You will create four files:
Report template schema definition file: Users.rsd .
Report template file: Users.4rt .
Properties file: Users.4rt.prop .
Image file: Users.4rt.png .
Before you begin :
Ensure that you have a directory on your disk (for example,
MyReportTemplates ) to hold your report template files.
You may need to configure Genero Studio to recognize the directory .
In Genero Studio, create the project (for example,
MyTemplates.4pw ) to hold the template files.
Create a template schema definition file () and enter the following text:
<?xml version="1.0" encoding="utf-8"?>
<ReportSchema fileVersion="30000" gstVersion="30000" rootElementName="model">
<Field name="StringUserName" type="string" sampleValue="John Doe"/>
<Field name="NumericUserID" type="double" sampleValue="1234"/>
<Trigger name="requiredButNotUsed" minOccurs="0" maxOccurs="unbounded"/>
</ReportSchema>
Note: The trigger is required for the template to work, but it is not used in
this template.
Save the template schema definition file as Users.rsd
in your
report template directory .
This code creates two fields:
StringUserName of type String with a default value of John
Doe .
NumericUserID of type Double with a default value of
1234 .
Create a report template file ():
In the Data View, open the Users.rsd schema.
Drag and drop the StringUserName and the NumericUserID fields from the
Data View to the work area.
A Word Wrap Box and a Decimal Format Box are created, using the
appropriate class and data.
Add Word Boxes and edit the text to provide labels. The report template
should look like Figure 1 .
Figure: Report template example
Save the report template file as Users.4rt
in your report
template directory .
Create a text file in the same directory as the
template files. Save it as Users.4rt.prop and enter the following
text:
tags: Users
label: User Name and ID
description: Template with two fields
Create an image file in the same directory as the
template files. Save it as Users.4rt.png .
Note: You can take a screen capture of the existing template, or copy an image
from elsewhere.
Select .