Report Editor - Parameters
Reports are designed in the Valentina Studio Report Editor. Later a report can be used or 'played back' from application code. Sometimes you may need to change some parameter of report in a way that is not stored within the database or datasource itself, but allows some flexibility for the user. For example, a user may need to filter some specific data, broaden or narrow the scope of the report and have that reflected in appearance of the report, or other modifications. To do this, you can use the Report Parameters mechanism.
Parameters Tab
At the top of the tab there is a group of buttons to:
- add a new parameter
- remove selected parameter
- reorder parameters
List is filled with parameters, which were:
- added using the New Parameter dialog
- defined in the Expressions editor
Each parameter has a type, written next to its name.
The bottom of the panel contains a built-in editor with the same set of fields as New Parameter dialog.
New Parameter Dialog
New Parameter dialog contains following fields:
- Name: - the name of parameter
- Default: - the default value of parameter
- Interactive: - if TRUE, value of parameter will be asked from the user
- Type: - the type of parameter
- Items: - comma-separated list of values for choice-type parameter
The following types of parameters are supported:
- Boolean
- Choice
- Date
- DateTime
- Integer
- Real
- String
Preview of Report with Parameters
Valentina Reports supports interactive parameters embedded with the report allow Valentina Studio to generate a dialog that allows users to input variations on values. This allows a free copy of Valentina Studio on any supported operating system to act as a Report Client or Report Viewer. This allows a non-technical user to open, adjust or modify options (through the options on the dialog) as needed, before viewing or printing a copy of the report. This allows Valentina Studio to work as a self contained office solution.
Example of such dialog, shown on switch to the Preview mode:
Parameters have appropriate editors depending on their types.