Tuesday, 15 September 2009

NextReports - Parameters with default values


From version 2.4 NextReports will have support for default values in parameters definition.


The ‘Default‘ tab contains the default values the parameter can take. Those values can be added by hand to a list (as in previous image) or can be taken from an sql source . If the parameter has default values, those values will be selected at runtime. If parameter is checked as hidden the parameter will not be seen at runtime, and it’s values will be computed and set at the moment the query is executed.

For example if you need a hidden parameter that is substituted at every run with the current date, you can edit the source with “select sysdate from dual” for Oracle datasource. For Derby database used as demo you may use "select current_date from sysibm.sysdummy1". The user does not have to know the format of the select for the connected data source. A template button in the dialog source does it automatically.

1 comment: