These query file conventions are specific to Response reports.
Section Separators
Each section begins and ends with a double percent sign %% to signify where the Reports component should parse the section.
Section Names
Each section begins with the section name enclosed in brackets (for example, [query description]).
Section Values
The value for each section follows the section name and a carriage return.
Merge Fields
Merge fields are surrounded by braces (for example, {start_last_week}) and can be placed anywhere within section values. A list of supported merge fields is below.
Query File Sections
[query name]
Not used in KANA Response.
[query description] (optional)
Provides a description of the query and the report that is displayed in the Reports component status area. The Query Description is not required but is highly recommended in order to give users as much information about the query as possible.
[default date field] (required for finds based on date RANGE)
Provides the name of the primary date field used for finding by date range. If a date field is entered, this is the field that is queried when a user selects a date range such as Today, Yesterday, This Week, Last Week, and so on, from the date range drop-down menu in the Find Criteria panel. If this field is not found, the Reports component disables the date range selection option.
[message format field] (optional)
Provides the name of the msgformat field, which describes the type of a message. When this field is supplied, the 3 "Report FORMAT" check boxes are enabled, letting the user filter the messages included in a report by message type.
[query] (required)
Provides the base SQL statement that gets executed when the report is run. Note that this query always overrides any query in the RPT file.
[department id field] (optional)
Provides the name of the department ID field in the report's primary view. If this field is present, the presented data will be restricted to departments available to the user running the report.
[department user field] (optional)
Provides the name of the user ID field in the report's view. If this field is present, the presented data will be restricted to the users visible to the user running the report.
[department category field] (optional)
Provides the name of the category field in the report's view. If this field is present, the data in the report will be restricted to those categories visible to the user running the report.
[message format field] (optional)
Provides the number of the message format field. If this field is present, the report user interface message format check boxes will be activated, letting the report data be restricted by message type (e-mail, KANA I-MailTM, and/or web form messages).
[global flags] (optional)
Provides control over various parts of the Reporter's user interface. Currently, only the "DisableAll" flag is supported. When present, the "DisableAll" flag causes the user interface to disable the "All" Find Criteria option.
[fields] (optional)
Provides a list of the fields where users enter values to perform custom finds. This section is described in greater detail in "Specifying Custom Fields".
[help page] (optional)
Provides a pointer to the location of the help file associated with this report. So when this report is highlighted (or is being viewed) the user can click the Explain link and an HTML file will open to describe the report to the user. For this to function, the user who is customizing must first create an HTML file and place it in the appropriate folder on the web server (C:\Program Files\KANA\KANA Web Server\main_help\help\kana_reports\reports\WebHelp\dialog ) and then put that file name under the definition as demonstrated in the query file example.
[parameterized view field]
Provides a method by which to dynamically change the view name that the ODBC driver uses to run the report at run time. Currently, there are two key words that can be replaced in the view name: ”r;Object” and ”r;View”. If this definition is used then the definition [object parameters] and [data parameters] must be used as well to set the values available for the view name to change with. The options are then displayed in the ”r;Report On:” and ”r;Group By:” run time parameters in the Content section of the UI.
[object parameters]
Provides a listing of the available parameters that have the capability to change the name of the database view that the ODBC driver will access at runtime for the report.
[data parameters]
Provides a listing of the available parameters that have the capability to change the name of the database view that the ODBC driver will access at runtime for the report.
Database Values
{dbserver}--name of the database to access.
{dbname}--name of the owner of the table (usually set to dbo with SQL Server, left blank with Oracle and DB2).