Create the report schema file
Create the report schema file for a new template with a string field and a numeric field.
- Create a new directory on your disk (e.g: MyReportTemplates) to hold your report template files.
- Set the report template directory to recognize the new template.
- Create a new project by going to File > New > Genero and selecting Simple Project (.4pw).
- Save the project as MyTemplates.4pw in your new directory.
- Create a new template schema definition. Go to File > New > Reports, select Template Schema Definition (.rsd), and click OK.
-
Edit the .rsd file:
<?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="RequiredButUnused" minOccurs="0" maxOccurs="unbounded"/> </ReportSchema>
Note: The trigger is required for the template to work, but in this case is not used.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
- Save the file as Users.rsd. Insert the file into your project in the Group > Application > Schemas node.