Hitachi Vantara Pentaho Community Wiki
Child pages
  • BI-Server Reporting Plugin Documentation
Skip to end of metadata
Go to start of metadata

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.

http://localhost:8080/pentaho/Home?name=Inventory%20in%20PUC&startup-url=http%3A%2F%2Flocalhost%3A8080%2Fpentaho%2Fcontent%2Freporting%2Freportviewer%2Freport.html%3Fsolution%3Dsteel-wheels%26path%3D%2Freports%26name%3DInventory.prpt

Launching the report without the Pentaho User Console

http://localhost:8080/pentaho/content/reporting/reportviewer/report.html?solution=steel-wheels&path=/reports&name=Sales%20Summary.prpt

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)

Name

Description

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:

Value

Description

REPORT

renders the report

XML

returns the parameter description document for the UI

PARAMETER

same as XML, but does not perform any pagiation

SUBSCRIBE

for managing subscriptions

DOWNLOAD

Downloads the prpt file, if the user has the correct permissions

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.

Output-target

Description

table/html;page-mode=stream

HTML as a single page, all report pagebreaks are ignored

table/html;page-mode=page

HTML as a sequence of physical pages, manual and automatic pagebreaks are active

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;page-mode=flow

Excel 2007 XLSX Workbook

table/excel;page-mode=flow

Excel 97 Workbook

table/csv;page-mode=stream

CSV output

table/rtf;page-mode=flow

Rich-Text-Format

pageable/pdf

PDF output

pageable/text

Plain text

pageable/xml

Pageable layouted XML

table/xml

Table-XML output

pageable/X-AWT-Graphics;image-type=png

A single report page as PNG

mime-message/text/html

Mime-Email with HTML as body text and all style and images as inline attachments

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.
This is the same result as if the report configuration property "org.pentaho.reporting.engine.classic.core.modules.output.table.html.BodyFragment" has been set to true.

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.
This property is deprecated. Auto-Submit should be defined inside the report itself. A global default can be defined in the report configuration, using the global configuration key
"org.pentaho.reporting.engine.classic.core.ParameterAutoSubmit".

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.
This property is deprecated. Auto-Submit-UI should be defined inside the report itself. A global default can be defined in the report configuration, using the global configuration key
"org.pentaho.reporting.engine.classic.core.ParameterAutoSubmitUI".

subscribe

A internal flag indicating that a subscription is configured.

subscription-id

A internal parameter.

subscription-name

A internal parameter.

destination

A internal parameter.

print

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.

  • No labels