Chapter 9 WRF File Reference

WRF File Format

The layout of a WRF file is as the following:

WordReport Version 2.0
[Data Source]
......
[File]
......
[Parameter]
......
[SQL]
......

"WordReport" is the flag of WRF file. "Version 2.0" is the version of WRF file.

A WRF file contains several sections. The sections of [Data Source], [File], and [Parameter] consist of a group of related settings. The sections and settings are listed in the WRF file in the following format:

[section name]
keyname=value

In this example, [section name] is the name of a section. The enclosing brackets ([]) are required, and the left bracket must be in the leftmost column on the screen.

The keyname=value statement defines the value of each setting. A keyname is the name of a setting. It can consist of any combination of letters and digits, and must be followed immediately by an equal sign (=). The value can be an integer, a string, or a quoted string, depending on the setting.

You can include comments in these sections. You must begin each line of a comment with a semicolon (;).

The [SQL] section consists of functions. Each function is begin with the "@" character. Syntax:

@functionno=functionname(arguments)
sqlstatement

The functionno is the label of function.

The functionname represents a function.

The arguments define various properties for the function. An argument takes the form Name="Value". The argument value can be delimited by single or double quotes.

The sqlstatement is a SQL statement.

You can use comments in [SQL] section. A comment is the "/*" characters, followed by any sequence of characters (including new lines), followed by the "*/" characters. You cannot nest comments.

[Data Source] Section

The [Data Source] section contains information how to connect to data sources.

Name1=< name1 >
Name2=< name2 >
......
Name10=< name10 >

These settings specify the names of data sources you want to connect to. Name1 specifies the name of the first data source. Name2 specifies the name of the second data source...... You can define up to 10 data sources in one WRF file. You can make a connection to a data source using an ODBC data source name or a connection string. Even if you use a connection string to make a connection, you should define a name that you can reference in functions.

User1=< username1 >
User2=< username2 >
......
User10=< username10 >

These settings specify the user names. If you use an ODBC data source name to make a connection, you should define user name and password. If you use a connection string to make a connection, WDReportGen will ignore the setting. User1 specifies the user name of the first data source. User2 specifies the user name of the second data source...... They are optional settings. If defined default user and password in ODBC data source, you may not define them.

Password1=< password1 >
Password2=< password2 >
......
Password10=< password10 >

These settings specify the user passwords. If you use an ODBC data source name to make a connection, you should define user name and password. If you use a connection string to make a connection, WDReportGen will ignore the setting. Password1 specifies the password of the first data source. Password2 specifies the password of the second data source...... They are optional settings. If defined default user and password in ODBC data source, you may not define them.

ConnectionString1=< connectionstring1 >
ConnectionString2=< connectionstring2 >
......
ConnectionString10=< connectionstring10 >

These settings specify the connection strings. If you defined a connection string, WDReportGen will make a connection to the data source using the connection string, and ignore the settings of the name, user and password. But you must define a name that you can reference in functions. ConnectionString1 specifies the connection string of the first data source. ConnectionString2 specifies the connection string of the second data source...... They are optional settings. If no connection string, WDReportGen will make a connection to data source using the ODBC data source name.

EncryptPassword =Y/N

This setting specifies how to save the passwords of data sources. If the value is Y, the passwords will be saved in an encrypted format. If the value is N, the passwords will be saved in plain text.

[FILE] Section

[FILE] section contains information about files.

ReportTemplateFileName=< templatefilename >

This setting specifies the name of report template file. < templatefilename > value is the name and path of report template file. The file path can be a relative path or an absolute path. If it is a relative path, the base path is the path of WRF file.

ReportFileName=< reportfilename >

This setting specifies the name of report file. < reportfilename > value is the name and path of report file. The file path can be a relative path or an absolute path. If it is a relative path, the base path is the path of WRF file. In < reportfilename >, you can use parameters.

ProtectReport=< Y/N >

This setting specifies whether the report generated is protected. If the value is Y, the report is protected, and cannot be modified. If the value is N, the report is not protected. Default is N.

ProtectionPassword=< protectionpassword >

This setting specifies the password that is used to protect the report. < protectionpassword > value is the password. This setting is valid when ProtectReport is Y.

LogFileName=< logfilename >

This setting specifies the name of log file. < logfilename > value is the name and path of log file. The file path can be a relative path or an absolute path. If it is a relative path, the base path is the path of WRF file. In < logfilename >, you can use parameters.

[PARAMETER] Section

[PARAMETER] section contains information about parameters.

Name1=< name1 >
Name2=< name2 >
......
Name10=< name10 >

These settings specify the names of parameters. Name1 specify the name of the first parameter, Name2 specifies the name of the second parameter...... You can define up to 10 parameters in one WRF file.

Title1=< title1 >
Title2=< title2 >
......
Title10=< title10 >

These settings specify the titles of parameters. Title1 specifies the title of the first parameter. Title2 specifies the title of the second parameter......

Default1=< default1 >
Default2=< default2 >
......
Default10=< default10 >

These settings specify the default values of parameters. Default1 specifies the default value of the first parameter. Default2 specifies the default value of the second parameter......