BI-Server Reporting Plugin Documentation
When reports are rendered in the Pentaho User Console, they are rendered via a Pentaho Plugin (Reporting Platform Plugin).
Like .xactions, reports (.prpts) can be accessed via a URL. This URL can be easily be created by right clicking on a report (.prpt) and selecting "Create Deep Link". Note: This encodes the URL.
Launching the report within the Pentaho User Console
In the link below, "name" parameter allows you to assign a name to the tab that will display in the Pentaho User Console.
Launching the report without the Pentaho User Console
Passing Date and Number Parameter
Pentaho Reporting expects that all Number parameter conform to a standard format using the format pattern:
"###0.##############################################"
Example: 1234.5678
Numbers are parsed with Locale.US, so the decimal separator is a point.
Dates must be passed using the ISO-standard date format. The corresponding date format string is
"yyyy-MM-dd'T'HH:mm:ss.SSSz"
Example: 2010-12-31T19:39:15.010+0000
In case of server timezone dates, the timezone can be omitted.
Reporting Plugin Parameter Reference
The Pentaho Reporting System reserves all parameter names starting with "::" as system parameter. The engine will claim these parameters as private property. Do not use such parameter names for your own reports.
In addition to that, the following parameter names are used by the BI-Server reporting-Plugin and should not be used in a report for user-data (unless you know exactly what you are doing)
solution |
The name of the current solution in the solution repository | ||||||||||||||||||||||||||
path |
The path within the solution repository | ||||||||||||||||||||||||||
name |
The name of the prpt within the repository | ||||||||||||||||||||||||||
action |
Alias for the "name" parameter. | ||||||||||||||||||||||||||
renderMode |
One of the following values:
| ||||||||||||||||||||||||||
output-target |
Defines how the report should be exported. This parameter is the canonical output parameter and overrides all other parameters that may attempt to define the output type.
| ||||||||||||||||||||||||||
dashboard-mode |
if "true": If the export generates HTML, the report will generate a body-fragment (content without the HTML, HEAD and BODY tags and all styles inlined into "style" attributes), which is easy to include in dashboards or other HTML pages. | ||||||||||||||||||||||||||
accepted-page |
Defines which page to generate for HTML-Page and PNG output. | ||||||||||||||||||||||||||
autoSubmit |
Defines whether auto-submit should be active in the UI. If this parameter is given and either "true" or "false", the UI will not allow the user to change the auto-submit configuration. | ||||||||||||||||||||||||||
autoSubmitUI |
Defines the initial state for the auto-submit checkbox in the UI. This parameter has no effect if "autoSubmit" is defined in any way. | ||||||||||||||||||||||||||
subscribe |
A internal flag indicating that a subscription is configured. | ||||||||||||||||||||||||||
subscription-id |
A internal parameter. | ||||||||||||||||||||||||||
subscription-name |
A internal parameter. | ||||||||||||||||||||||||||
destination |
A internal parameter. | ||||||||||||||||||||||||||
|
Defines whether the report shall be printed. Overrides all other output properties. | ||||||||||||||||||||||||||
printer-name |
The (optional) name of the printer if "print=true". | ||||||||||||||||||||||||||
showParameters |
Defines whether the parameter UI shows any parameter input. This URL parameter is deprecated. Use the report attribute with the same name instead. | ||||||||||||||||||||||||||
report-definition |
Only usable in XActions. Has no effect if given on a URL. | ||||||||||||||||||||||||||
useContentRepository |
Only usable in XActions. Has no effect if given on a URL. | ||||||||||||||||||||||||||
workbook |
Only usable in XActions. Has no effect if given on a URL. | ||||||||||||||||||||||||||
res-url |
Only usable in XActions. Has no effect if given on a URL. | ||||||||||||||||||||||||||
paginate |
Deprecated. Only used in legacy reports. | ||||||||||||||||||||||||||
content-handler-pattern |
Only usable in XActions. Has no effect if given on a URL. | ||||||||||||||||||||||||||
layout |
Defines how the parameter inputs are laid out. Can be one of "vertical", "horizontal" or "flow". This URL parameter is deprecated, use the report attribute instead. A global default can be defined in the report configuration, using the global configuration key "org.pentaho.reporting.engine.classic.core.ParameterUiLayout" | ||||||||||||||||||||||||||
ignoreDefaultDates |
Deprecated. Has no effect anymore. The UI does no longer generate default selections, if you need a default value for a parameter, set it in the parameter definition instead. | ||||||||||||||||||||||||||
output-type |
Deprecated. Use "output-target" instead. |
How the simple-reporting-component selects the output-target
The algorithm to determine the output target from the given parameters is as follows:
- If the report attribute "lock-preferred-output-type" is set, and the attribute preferred-output-type is set, the report will always be exported to the specified output type.
- If the component has the parameter "output-target" set, this output target will be used.
- If the component has the parameter "output-type" set, the mime-type will be translated into a suitable output target (depends on other parameters like paginate as well.
- If neither output-target or output-type are specified, the report's preferred output type will be used.
- If no preferred output type is set, we default to HTML export.
If the output type given is invalid, the report will not be executed and calls to
SimpleReportingComponent#getMimeType() will yield a generic "application/octet-stream" response.
Specification for the Report Viewer Parameter Information Document
The report viewer communicates with the server via a simple, XML based protocol. When asking the server for a parameter document, you can pass in a set of parameter values that should be validated by the server. The server will use that parameter set as context information to parametrize the response and to send back potential cascading parameter selections for the currently selected set of parameters. For each parameter that has an invalid value, the server will return error information.
The file format is specified here: http://wiki.pentaho.com/display/Reporting/Specification+for+the+BI-Server+Plugin+Parameter-XML+format
Examples
To download a PRPT file from the server:
/content/reporting?renderMode=DOWNLOAD&solution={0}&path={1}&name={2}
To view the parameter document for a report.
/content/reporting?renderMode=PARAMETER&solution={0}&path={1}&name={2}
To run a report with the parameter-UI:
/content/reporting/reportviewer/report.html?solution={0}&path={1}&name={2}
To run a report without a Parameter-UI.
/content/reporting?renderMode=REPORT&solution={0}&path={1}&name={2}&output-target{3} /content/reporting?renderMode=REPORT&solution={0}&path={1}&name={2}&output-type{3}
Note that all report-parameters must be specified in addition to the parameters here, as the report will not run if the report-parameter validation fails.