Wednesday, February 29, 2012

NextReports: Some Internal Tips

From version 5.1, NextReports Designer allows to instantly open some report or chart  when it starts.

There are some system properties which can be used to achieve this:

next.datasource
This property is similar to singleSourceAutoConnect, but when we have more than one data source. NextReports Designer will start and it will connect to this datasource.

next.report 
If there is a connected data source (specified by next.datasource system property) this report will be auto-loaded.

next.chart
If there is a connected data source (specified by next.datasource system property) this chart will be auto-loaded.

next.path
If the report or chart is not found in the root node, but inside some folder, this property will specify the relative path.  Slashes or back-slashes can be used in any combination.

If both next.report and next.chart  system properties are specified, chart property is ignored. 

For your installed designer, you can specify system properties inside nextreports.vmoptions file.
For example adding these lines at the end of the file
-Dnext.datasource=Demo 
-Dnext.report=Timesheet
it will make your designer on start to auto-connect to Demo data source and to automatically open Timesheet report.

If your report is found inside /Test/Test1 folder path
-Dnext.datasource=Demo 
-Dnext.report=Timesheet
-Dnext.path=/Test/Test1
Path is converted to use specific file system separator, so you can enter it as you wish (/Test/Test1, Test/Test1, Test//Test1, \\Test\\Test1, Test\\Test1, \Test\Test1).

No comments: