Accessing Reports via a URL

This section describes how to call a BI Publisher report via a URL from another application.

For example, from a portal or from an Application Express application. It contains the following topics:

Security Considerations

In the BI Publisher security model, reports are placed in folders and those folders are then secured to a role and a role assigned to a user.

For a user to successfully access the report, you must ensure that the user is credentialed within BI Publisher to see it. There are two options for this:

  • Use the Guest folder

    Reports in the Guest folder are available to all users to see and run. Use this option if the report does not contain sensitive data. Enable the Guest folder on the Security Configuration tab of the Security Center page. For more information, see Enabling a Guest User in the Administrator's Guide for Oracle Business Intelligence Publisher.

  • Use SSO

    If both the calling application and BI Publisher are configured as partner applications in an SSO server, you can call any report via a URL, and, as long as the user has rights to see or run the report, then BI Publisher will render it without the need for the user to log in. For more information on setting up security options, see Configuring BI Publisher with Single Sign-on (SSO) in Administrator's Guide for Oracle Business Intelligence Publisher.

Building the URL

You can call a BI Publisher report via a URL, for which you can build the URL.

The basic URL for a report is:

http://<server:port>/xmlpserver/<ReportDirectory>/<ReportName>.xdo

where

  • server:port - is the name of the server and port number where BI Publisher is running
  • xmlpserver - is a required static string (the name of the application)
  • ReportDirectory - is the folder path to the report. When the report is under Shared Folders, do not include "Shared Folders" in the path. If the report is under My Folders, include the ~username as the first node in the path. See the examples following.
  • ReportName.xdo - is the name of the report with the .xdo extension. If the name contains spaces, replace the space with a "+" character.

Examples:

The following URL launches the North America Sales report. The report resides in the catalog under Shared Folders/Samples/Sales. Note that Shared Folders is not included in the path.

http://example.com:7001/xmlpserver/Samples/Sales/North+America+Sales.xdo

The following URL launches the North America Sales report that resides in the catalog under My Folders/Samples/Sales. Note that the user name in this case is weblogic, therefore the first node in the path is ~weblogic.

http://example.com:7001/xmlpserver/~weblogic/Samples/Sales/North+America+Sales.xdo

Specifying Parameters in the URL

The preceding examples render the complete report inside the BI Publisher report viewer with all the report controls.

The default layout, default output format, and default parameters are used to render the report. You can add parameters to the URL to specify how the report renders.

When constructing the URL, note the following standard URL syntax:? - denotes the first parameter& - denotes each additional parameter

The following table describes more parameters you can add to the URL.

Parameter Definition Example Usage

_xpt

Specifies whether to render the report in the BI Publisher report viewer or export the document to a new window appropriate for the output type. For example, if the output type specified is html, the report document (only) will render in a browser window; if the output type is PDF you will be prompted to save or open the PDF document. When this parameter is not specified, the report renders in the BI Publisher report viewer.

Valid values are:

  • 0 - renders the report in the BI Publisher report viewer

  • 1- exports the document to appropriate application window

_xpt=0

_xdo

(Optional) Provides the path to the report.

_xdo=%2FSamples%2FSalary+Report.xdo

_xt

Specifies the layout to use. Enter the name of the layout as defined in the report definition. If an invalid name is entered, the default layout is used.

_xt=Manager+Summary

_xf

Specifies the output format. If no value is specified, the default output format is used. If an invalid value is specified, or, if a value is specified that is not enabled for the layout, the report does not render. Valid values are:

  • analyze - use for Interactive output

  • rtf

  • docx

  • pdf

  • html

  • pptx - use for PowerPoint 2007

  • ppt - use for PowerPoint

  • xml - use for Data

  • excel - use for Excel

  • excel2000 - use for Excel 2000

  • xslx - use for Excel 2007

  • csv

_xf=pdf

Report parameters as named in the data model

Specify name-value pairs for the parameters specific to the report. You must use the parameter name as defined in the data model.

dept=10

_xmode

Specifies the report viewer mode. If not specified, defaults to view in the full report viewer. Valid values are:

  • 0 - view in the full report viewer.

  • 1 - hide BI Publisher banner, hide parameters, can change layout, other actions: export only.

  • 2 - hide BI Publisher banner. (No Header)

  • 3 - hide BI Publisher banner, hide parameters (No Parameters)

  • 4 - report document only: hide BI Publisher banner, hide parameters, hide other actions, hide layouts. (Document Only)

_xmode=1

Example:

http://example.com:7001/xmlpserver/Samples/Salary+Report.xdo?_xpt=0&_xdo=%2FSamples%2FSalary%20Report.xdo&_xmode=4&dept=10&_xt=Simple&_xf=html

This URL runs the report "Salary Report" located under Shared Folders/Samples. Note the following:

_xpt=0 renders the document in the report viewer

_xdo=%2FSamples%2FSalary%20Report.xdo defines the report path

_xmode=4 renders the document only

dept=10 sets the report-specific parameter "dept" to "10"

_xt=Simple uses the layout called "Simple"

_xf=html sets the output format to html