The i-net Clear Reports report engine executes report templates designed with the report designer and returns the executed report in the format requested by the user (e.g. pdf, rtf, xls or as preview in the Java Viewer). The client can request a report by passing the report URL to i-net Clear Reports.
The following parameters can be appended to the report URL on the client or can be changed on the server side in the method checkProperties. These parameters will be passed to the engine of i-net Clear Reports. If you use the Engine directly then there exist special API to set it.
The following parameters are passed to the HTML page and the Java report viewer reads them and passes them on to the report engine. In the report engine the parameters are finally stored in the engine.UserProperties object. These parameters pass the following checkpoints where they can be modified: checkHtmlPageProperties(), checkProperties(Properties props), checkProperties(Engine engine, Properties props). Additionally they can also be accessed in the getReportData() callback using the engine.getUserProperties() method.
For security reasons, only the following parameters are allowed by default in the report URL: “prompt”, “init” and “sproc”. To use other parameters in the report URL, like “datasource”, it is necessary to unlock them in the Configuration Manager.
It is always possible to set values for all parameters in the checkProperties method on the server side.
| Since Version: | 7.0 |
|---|---|
| API Method: | Datasource.setup(String) |
| Allowed by Default: | No |
Set the name of the data source configuration that will be used to create connection to the database. It overwrite the all values in main report and in subreports saved in the rpt file.
A Data Source Configuration contains all information needed to create a database connection.
You need to set a value for this parameter only if you like to use another data source configuration as saved in the *.rpt file.
| Since Version: | 7.0 |
|---|---|
| API Method: | Datasource.setup(String) |
| Allowed by Default: | No |
Sets the name of the data source configuration that will be used to create a connection to the database.
A Data Source Configuration contains all information needed to create a database connection.
You can use this parameter with an index to overwrite a single datasource in a report with several datasources in the mainreport or in the subreports. For example, the parameter datasource0 specifies the datasource that will be used as first datasource in the main report. The following parameters datasource1, datasource2, etc. will be used in the first sub report or in the mainreport, if it has more than one datasource.
| Since Version: | x |
|---|---|
| API Method: | Datasource.setPassword |
| Allowed by Default: | No |
Specifies the password for logging on to password protected databases used by the report and all of his sub reports. Use this parameter instead of password# if you use the same password for the main report and all sub reports.The password parameter for the users you only need to set if the password is not empty. You don't need to set an empty password like …&password0=.
| Since Version: | x |
|---|---|
| API Method: | Datasource.setPassword |
| Allowed by Default: | No |
Specifies one or more passwords for logging on to SQL, ODBC, or password protected databases used by the report, e.g.: user0=scott&password0=wood&user1=steven&password1=car.
<Name>
| Since Version: | x |
|---|---|
| API Method: | Engine.setPrompt |
| Allowed by Default: | Yes |
Specifies the value for the parameter field (prompt) with the specified name. (API documentation)
Parameter field values are assigned by name to the parameter fields. For example:
You can set the value for the parameter field “Field1” with: …&promptField1=test.
If the prompt is used as stored procedure parameter then it's name starts with a # sign, e.g.: ”#UserName”. In this case you can set the name with: …&prompt#UserName=User1.
| Since Version: | x |
|---|---|
| API Method: | Engine.setPrompt |
| Allowed by Default: | Yes |
Specifies the values for parameter fields in the report. (API documentation)
Parameter field values are assigned to parameter fields in the order the parameter fields exist in the report. For example: prompt0=car&prompt1=drive. To pass multiple parameters, you need to use the syntax prompt#=[val1, val2, …]. For example: prompt0=['Audi', 'Chrysler'].
In the following example prompt 0 is a Date prompt, prompt 1 is of type array of DateTime, prompt 4 is an integer and prompt 5 a string.
prompt0=Date(2001,01,01)&prompt1=[DateTime(2001,01,01),DateTime(2001,01,01)]&prompt2=42&prompt3='42'
#<subreportID>
#<Name>
| Since Version: | 8.0 |
|---|---|
| API Method: | Engine.setPrompt |
| Allowed by Default: | Yes |
Specifies the value for the parameter field (prompt) with the specified name in the subreport with the index given. Parameter field values are assigned by name to the parameter fields.
For example: You can set the value for the parameter field:
| Since Version: | x |
|---|---|
| API Method: | Engine.setSproc |
| Allowed by Default: | Yes |
Specifies the values for stored procedure parameters accessed by the report. Values are assigned to stored procedure parameters in the order the stored procedures are accessed by the report. For example: sproc0=12&sproc1=summer.
| Since Version: | x |
|---|---|
| API Method: | Engine.setSF |
| Allowed by Default: | No |
Specifies the Record selection formula. (API documentation)
Please note: If you want to use a database field in the new record selection formula that was not part of the the report at design time or that was not used in the record selection formula specified at design time, then you have to add it into your report design.
| Since Version: | x |
|---|---|
| API Method: | Engine.setGF |
| Allowed by Default: | No |
Specifies the Group selection formula.
| Since Version: | x |
|---|---|
| API Method: | Engine.setQueryFile |
| Allowed by Default: | No |
Specifies the Name and the path of the query file that should be used for this report.
Please note: Do not use another query file at runtime as at design time because the report will not work correctly with another query file.
| Since Version: | 2.0 |
|---|---|
| API Method: | new Engine(String) |
| Allowed by Default: | Yes |
Specifies the output format in which the executed report will be returned to the client and how the report should be displayed in the browser, e.g.: init=pdf. If the Plug-In is not installed or not available then it is possible to save the exported report on the disk.
A list of supported export formats are here.
Alternatively you can also use report file extension (since version 6.5). For example report.pdf is equals report.rpt&init=pdf. Report file extensions are valid for all formats without XML and DATA. Report file extensions can be used with the report URL. They can not be used with the API.
Also, you can start additional services like the “Cache Request Handler” (?init=cacheviewer) or the “Email Request Handler” (?init=email) with the init parameter if the services have been added to the list of valid request handlers in the configuration manager.
Please note that it is not possible to change or add this parameter in one of the checkProperties() callbacks. This parameter must be set before any of the callbacks is run, for example in the servlet service() method or in the method afterPropertiesStoredHook (see sample: MyReportServlet_setExportFormat.java).
| Since Version: | 9.2 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the filename that is used for the exported file. If the provided filename has no extension, the default extension of the chosen export format is appended.
| Since Version: | 5.2 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the format of the HTML file created if export us used.
If this property is used then the report will be exported in one HTML file.
This property sets the layout of the created HTML page. The following values are possible:
If this property is not used (default) then one HTML file will be created for each report page.
| Since Version: | 6.1 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the position of the page navigation.
The following values are possible:
| Since Version: | 5.2 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the delimiter that separates the fields.
If the property is not used then a comma will be used (default). If you use ”…&delimiter=” in the report URL then a white space will be used and if you use ”…&delimiter=%09” then a tab will be used as delimiter.
| Since Version: | 5.2 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the character that will be used as text qualifier.
If the property is not used then a quotation mark will be used (default). If you use ”"echar=&” in the report URL no text qualifier will be used.
| Since Version: | 8.1 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies if the exported CSV file contains column names in the first row.
The default value is: true.
| Since Version: | 3.3 |
|---|---|
| API Method: | Engine.stopAfterPage |
Allowed by Default: No
Specifies the upper bound for the number of pages to be rendered. If your report has n pages and you set stopAfter=100 then only MIN(100, n) pages will be rendered.
| Since Version: | 2.02 |
|---|---|
| API Method: | Engine.setClientLocale |
Specifies the Locale (language) that will be used for language independent reports. This parameter requires that the option “Use Client Locale” is true. If you not set this value then the value from the http header is used.
That means values can format language dependent if you have set a system format and the labels in a report can be translated into the language that is used on the client on that the user is viewing the report. The user can see the report in different languages depending on the locale that is used on it's system or on the value of the report URL property “locale”. The labels for the different languages will be saved in ResourceBundles. The base class for the ResourceBundles need to be specified in the property “LanguageResource”. You can set the value of this property with the configuration manager.
Please note: Only the language part of the locale specified in the report URL is used by i-net Clear Reports (e.g. en_US → en). The country part will be used from the default locale of the i-net Clear Reports server so that the currency values in the report are not depending on the client locale.
| Since Version: | 10.0 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the timezone of the client that will be used to format date and time values in the report. The formatting depends on the language and is used only for display, not for grouping. It is necessary to pass the timezone using this URL parameter for all output formats, expecting the Java report viewer.
| Since Version: | 6.0 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the characters used for line breaks. The default value is the server default value. If you set it in the URL then it must be encoded. For example for Windows newline=%0D%0A
| Since Version: | 6.0 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the page delimiter for plain text format. The default is a line of '='. If the last character is not a control character (lesser as white space) then a new line was added.
| Since Version: | 6.0 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the encoding for the txt file. The default is the server default encoding.
| Since Version: | 9.1 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the encoding for the csv file. The default is the server default encoding.
| Since Version: | 9.2 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies a comma separated list of fixed column widths, e.g. 3,5,5 or 5,5,,4. The following default values will be used for columns without specified width:
If this parameter is specified the exported csv file will not contain column delimiters and text qualifier.
| Since Version: | 9.1 |
|---|---|
| API Method: | Engine.setUserProperties |
Determines how to distribute text spanning multiple lines to Excel cells. The text is considered as spanning multiple lines if it has more then one line in the Java report viewer. For each option below, the number of Excel rows can not be more than the number of text lines in the Java report viewer.
The following values are possible:
| Since Version: | 7.6 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies whether strings which are too long for their cell will be truncated or not.
The default value is: true.
| Since Version: | 7.6 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies whether a new sheet will be created for every instance of the top-most group or not.
The default value is: false.
| Since Version: | 7.6 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies how many group levels are to be shown in the outline of the excel sheet.
A number between 0 and 7 is valid. The default value is: 0.
| Since Version: | 7.6 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the panel that will be displayed in the navigation panel of the PDF viewer.
Valid values are “bookmarks” and “pages”.
| Since Version: | 9.2 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies if the PDF file will be created according to the PDF/A-1b standard.
The default value is: false.
| Since Version: | 11.0 |
|---|---|
| API Method: | Engine.setUserProperties |
If the user and/or owner password is specified, the created PDF file will be encrypted with the symmetric AES algorithm (128 or 256 bit). With the user password it is possible to open and read the PDF file and with the owner password it is possible to open the PDF file, read it and change it's properties. To encrypt the PDF file it is necessary to specify at least one of these passwords.
AES algorithm with 128 bit (default)
This algorithm is supported since Adobe Reader version 7. The passwords can consist of latin and some additional characters, like TM and €.
AES algorithm with 256 bit
This algorithm is supported since Adobe Reader version 9. The passwords can consist of (almost) any Unicode characters. Not allowed are control-, private-use-, non-character-, surrogate-, change-display-properties- und tagging-characters. The password should not contain characters with left to rigth direction and rigth to left direction.
To use this algorithm instead of the default algorithm with 128bit, it is necessary to download the “Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6” from the URL: http://www.oracle.com/technetwork/java/javase/downloads/index.html. The files local_policy.jar and Us_export_policy.jar in the directory “jre\lib\security” of the used Java VM need to be replaced with the downloaded files.
Example report URL: http://localhost:9000/?report=...rpt&upass=abcd&opass=xyz&init=pdf
| Since Version: | 9.0 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the size of the image. You can only set one of it. zoom can be set in percent or as floating point number. width and height are set in pixel.
| Since Version: | 9.0 |
|---|---|
| API Method: | Engine.setUserProperties |
Specifies the color of transparent parts of the image. The color is in ABGR format and can be set as decimal or hexdump number. For example 255 or 0xFF are red.
| Since Version: | x |
|---|---|
| API Method: | Engine.getPage |
Specifies the number of the requested page. This is only valid for export formats that have a separate file for every page like images or HTML.
Additionally you can pass applet parameters in the URL string. These parameters are used by the i-net Clear Reports - Java Viewer. Note that these parameters are not stored into the user properties object in the report engine. Instead these parameters are only used when creating the HTML page for the i-net Clear Reports - Java Viewer and can only be modified in the checkHtmlPageProperties() callback.
Note: If you create your own HTML pages containing the code for an applet using the Java Viewer, don't set the applet parameters as URL parameters for the report name.
| Since Version: | x |
|---|
Title of HTML page that contains the Java Viewer applet. The default value is “i-net Clear Reports Java Client”.
| Since Version: | x |
|---|
Background color of the HTML page that contains the Java report viewer applet. The default value is: “C6C6C6” (light gray).
| Since Version: | x |
|---|
Which applet code should be used? The default value is “com.inet.viewer.ViewerApplet”.
| Since Version: | x |
|---|
Location from that the archive file CC-Viewer.jar will be loaded. The default value is: “http:<hostname>:<port>/core” for the ReportSocket and “http:<hostname:<port>/<servlet-context>/core” for a servlet engine.
| Since Version: | .3 |
|---|
Enable/Disable the status bar of the Java report viewer (default “true”).
| Since Version: | x |
|---|
Enable/Disable the export button of the Java report viewer (default “true”).
| Since Version: | x |
|---|
Enable/Disable the refresh button of the Java report viewer (default “true”).
| Since Version: | x |
|---|
Enable/Disable the print button of the Java report viewer (default “true”).
| Since Version: | x |
|---|
Enable/Disable the search text field and button of the Java report viewer (default “true”).
| Since Version: | 5.3 |
|---|
Enable/Disable the zoom drop down box of the Java report viewer (default “true”).
| Since Version: | x |
|---|
Enable/Disable the group tree in the Java report viewer (default “true”).
| Since Version: | x |
|---|
Triggers if a prompt dialog should be opened in the Java report viewer. If set to 0 or “false” a prompt dialog will not be opened.
| Since Version: | 9 |
|---|
(For the Java report viewer only): Specifies an auto-refresh cycle in milliseconds, e.g. “autorefresh=30000” would specify an auto-refresh of 30 seconds. This causes the report to be automatically refreshed in the Java report viewer, unless the report is currently being loaded anyways.
| Since Version: | 3.x |
|---|
Enable/Disable the logging output of the Java report viewer (default “true”).
| Since Version: | x |
|---|
Location from that the archive file CC-Viewer.jar will be loaded.
The default value is the value of the codebase parameter with ”/CC-Viewer.jar” appended.
If you want to load the viewer from the different location use:
http://<servername>:<port>/?report=...rpt&archive= http://<serverName>:<port>/crystalclear_2/CC-Viewer.jar
The following sample URLs showing the usage of the parameters when you request a report:
To use the sample URLs on your system replace:
The following sample URLs showing the request of a report from the i-net Clear Reports servlet: In these cases the report sample1.rpt is located in a virtual directory called: MyReports.
http://<serverName>:<port>/<servletContext>/ReportServlet?report=MyReports/sample1.rpt&password=pwdhttp://<serverName>:<port>/<servletContext>/ReportServlet?report=MyReports/sample1.rpthttp://<serverName>:<port>/<servletContext>/ReportServlet?report=MyReports/sample1.rpt&prompt0=TestNote that the MyReports/sample1.rpt resource in the examples above is located via “servletContext.getResource()”. Where exactly MyReports/sample1.rpt is located depends on the servlet engine. To be portable across servlet-engines, please use a full URL path for example: report=file:c:/MyReports/sample1.rpt.
In the following example the report sample1.rpt is located in the directory: C:\Reports.
http://<serverName>:<port>/<servletContext>/ReportServlet?report=file:C:/Reports/sample1.rptThe following sample URLs showing the request of a report from the i-net Clear Reports server application:
http://<serverName>:9000/MyReports/sample1.rpt&password=pwdhttp://<serverName>:9000/?report=http://<serverName>/MyReports/sample1.rpthttp://<serverName>:9000/?report=file:C:/Reports/sample1.rptIt is also possible to set the report URL parameters on the server-side. For example it is usually not a good idea to pass the password for the database as a report URL parameter. Please see the programming section for more information how to change the report parameters on the server-side. In short you use either the checkHtmlPageProperties() to change the applet parameters or the checkProperties(Properties props) callback to change the path to the report template or the checkProperties(Engine engine, Properties props) callback to change the default values red from the report template using RDC.
i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to clearreports@inetsoftware.de.