Switch to: V12V11V10V9V8V7V6V5

Valentina Reports Parameters

[new in v6.3]

Report is designed in Report Editor of Valentina Studio. Later it can be used from some application code. Often you need to change some parameter of report, which is NOT stored in the database/datasource. To do this, you can use mechanism of Report Parameters.

Consider 'Report Parameter' as a global variable of the report.

Define Parameter in VStudio

Parameters can be defined:

  • inside of the Expression Field in your report
  • inside of the source query of your report

Macro $P is used to define a parameter in the following format:

 $P( param[=DEFAULT] )

Query Parameters

On the following picture you can see a query with one parameter inserted:

Expression Parameters

On the following picture you can see an expression editor with two parameters defined:

Report with added parameters in design mode:

Resulting report, macros $P are replaced with default values:

Read more ...

Change Parameter using ADK Method

To change parameter value before report generation you can use method SetParameterValue().

Your report can have, for example, 5 pre-defined parameters, but in the code you modify only 3. Rest will use the default values.

You can set parameters and generate report. Then change some parameters and generate another report.