This documentation provides you with information for constructing
parameterized URLs with the OpenDocument syntax. OpenDocument URLs
link to Business Intelligence (BI) documents in an BusinessObjects Enterprise
system. A parameter reference, including syntax and usage examples, is
provided for each OpenDocument URL parameter.
For information about deploying the OpenDocument web application after
the installation of BusinessObjects Enterprise, see the BusinessObjectsEnterprise Web Application Deployment Guide.
Who should use this documentation?
This documentation is for anyone creating URLs to BI documents with the
OpenDocument syntax. We recommend consulting this guide if you are:
•Providing end users with hyperlinks to a document through email or other
direct means.
•Embedding hyperlinks in one document to another.
•Programmatically generating hyperlinks to documents in your custom
application.
Familiarity with the management and organization of objects in your
BusinessObjects Enterprise deployment is beneficial.
About OpenDocument
OpenDocument is one of many deployed web applications within an
BusinessObjects Enterprise system. It processes incoming URL requests
for documents and any other viewable object type in the Central Management
Server (CMS), and delivers the correct document to the end user in the
appropriate viewer. This allows you to send users direct links to a document
and avoid having them navigate through a folder hierarchy, such as in
InfoView. The OpenDocument syntax and its parameters allow you to
6Viewing Reports and Documents using URLs
OpenDocument
Getting started
construct URLs that link to these documents. For example, consider the
following URL:
Replace <servername>:<port> with the name and port number of your web
server where OpenDocument is deployed.
This URL accesses the object in the CMS with the CUID value of Aa6GrrM79cRAmaOSMGoadKI. If this is a Crystal report, for example, then the
report is rendered to the user in a default Crystal Reports viewer. In this
example, iDocID is one of many URL parameters. These parameters specify
how to access a particular document in the CMS, or determine how to display
the document to the user.
You can link to many viewable object types with the OpenDocument syntax.
Some examples include:
•Crystal reports
•Web Intelligence documents
•Voyager workspaces
•InfoView dashboards
•Xcelsius visualizations published as SWF files.
1
Some of the designers for these BI document types provide GUI-based URL
builders to help you embed openDocument URLs into your documents.
Consult their respective product documentation for information on these
features.
What's new with OpenDocument
URL syntax change
The virtual directory businessobjects is no longer created during installion
of BusinessObjects Enterprise. This affects the URL syntax for
OpenDocument links.
The exact syntax of the <platformSpecific> parameter depends on your
BusinessObjects Enterprise deployment:
•For Java deployments, use openDocument.jsp in place of the
<platformSpecific> parameter.
•For .NET deployments , use opendocument.aspx in place of the
<platformSpecific> parameter.
Note:
Variables are denoted with angle brackets. You must substitute the proper
value for these variables. For example, you must use the name of your
BusinessObjects Enterprise server where OpenDocument is hosted in place
of <servername> and you must use the correct port number in place of
<port> to access the OpenDocument web application.
Links to documents must use the new URL syntax, or you must create the
appropriate businessobjects virtual directory.
sReportMode
sReportMode is a new URL parameter to view a Crystal Report in different
modes depending on the option passed to the parameter. Possible values
include:
•part displays part of a report using the parts viewer to render the report.
•printlayout displays the report in a print preview layout.
•weblayout displays the report as a web page layout.
8Viewing Reports and Documents using URLs
Interactive Parameters
Crystal Reports parameter prompt values passed into the URL are always
be applied to the report, even if the report instance contains saved data. This
is a change in behavior from previous releases.
Forcing the Prompts dialog for Web Intelligence prompts
The character ? is now a reserved prompt value for Web Intelligence
documents in an OpenDocument URL. Setting the prompt value to
lsM[NAME]=? or lsS[NAME]=? in the URL forces the "Prompts" dialog box
to appear for that particular prompt.
OpenDocument syntax
Basic URL syntax
The basic syntax for an OpenDocument URL is as follows:
The exact syntax of the <platformSpecific> parameter depends on your
BusinessObjects Enterprise deployment:
•For Java deployments, use openDocument.jsp in place of the
<platformSpecific> parameter.
•For .NET deployments , use opendocument.aspx in place of the
<platformSpecific> parameter.
Note:
Variables are denoted with angle brackets. You must substitute the proper
value for these variables. For example, you must use the name of your
BusinessObjects Enterprise server where OpenDocument is hosted in place
of <servername> and you must use the correct port number in place of
<port> to access the OpenDocument web application.
Viewing Reports and Documents using URLs9
OpenDocument
1
OpenDocument syntax
URL syntax considerations
Accessing documents
You must include the iDocID or sDocName parameter in your
OpenDocument URL to specify the document to be viewed. Since there may
be multiple documents in the Central Management Server (CMS) with the
same name, and documents can be moved or renamed, it is recommended
that you use iDocID to ensure uniqueness.
Joining parameters
Join parameters with the ampersand (&). Do not place spaces around the
ampersand. For example: sType=wid&sDocName=Sales2003
The ampersand is always required between parameters.
Spaces and special characters in parameter values
Because some browsers cannot interpret spaces, the parameters of the link
cannot contain spaces or other special characters that require URL encoding.
To avoid the misinterpretation of special characters, you can define a
URL-encoded string in the source database to replace the special character
with an escape sequence. This will allow the database to ignore the special
character and correctly interpret the parameter value. Note that certain
RDBMS have functions that allow you to replace one special character with
another.
By creating an escape sequence for the plus sign (+), you can instruct the
database to interpret the plus sign as a space. In this case, a document title
Sales Report for 2003 would be specified in the DocName parameter as:
&sDocName=Sales+Report+for+2003&
This syntax prevents the database from misinterpreting the spaces in the
title.
Trailing spaces in parameter values
Trim trailing spaces at the end of parameter values and prompt names. Do
not replace them with a plus sign (+). The viewer may not know whether to
10Viewing Reports and Documents using URLs
OpenDocument
Session management
interpret the plus sign (+) as part of the prompt name or as a space. For
example, if the prompt name displays:
Select a City:_
(where _ represents a space), enter the following text in the link:
lsSSelect+a+City:=Paris
where the spaces within the prompt name are replaced with the plus sign,
and the trailing space is trimmed off.
Capitalization
All of the OpenDocument parameters are case sensitive.
URL length limit
OpenDocument may add characters to your URL when it redirects to the
requested document; however, encoded URLs cannot exceed the maximum
character limit for the supported browsers. For example, certain versions of
Internet Explorer limit the URL length to 2083 characters. Therefore, know
the browser character limit to ensure your URL will be within the maximum
limit.
1
Parameter values in links to sub-reports
You cannot pass parameter values to a sub-report of a target Crystal report.
Opening a new window
To force OpenDocument HTML links to open a new browser window, use
the HTML anchor's target attribute or an equivalent. For example:
Normally when using an OpenDocument link to access password-protected
documents, the user will be prompted for credentials. OpenDocument allows
Viewing Reports and Documents using URLs11
OpenDocument
1
Session management
Logon tokens
you to pass a logon token directly into the OpenDocument URL. This gives
you control over the duration of the access to the document. OpenDocument
URLs can be set to different languages.
Logon tokens can be used in OpenDocument by inserting the token
parameter into the OpenDocument URL. Logon tokens allow users to access
password-protected files without being prompted for credentials, while also
giving you control on the duration of the access to the file. Creating a new
logon token uses up an additional licence.
Example:
The following example uses the BusinessObjects Enterprise Java SDK to
pass in a logon token to the OpenDocument URL. For more information on
the ILogonTokenMgr.createLogonToken method, see the
BusinessObjects Enterprise Java API Reference.
•Replace <server> with the server name and <port> with the port number of
your web server.
•The createLogonToken method allows you to specify the machine that
can use the token (which can be empty to allow any user to use the token),
the number of minutes the token is valid for, and the number of logons that
the token can be used for as parameters.
12Viewing Reports and Documents using URLs
•Since an OpenDocument URL with a logon token contains the user session,
they must not be shared for security reasons.
User sessions
When OpenDocument is used from InfoView or CMC, it will access the current
user session and the user does not need to enter credentials. When a
document is viewed using an OpenDocument URL, the user will be prompted
for credentials except in the following cases:
•Vintela or Siteminder SSO is configured in the OpenDocument web.xml
file.
•The OpenDocument URL uses a token parameter.
•The OpenDocument application has an existing user session for that
browser session.
If the existing session is different than the session in the token parameter,
the existing session will be closed and a new session will be created. That
is, you can use token parameter to over-ride an existing user session. The
OpenDocument application will look for an existing user session in the Web
application session and in cookies.
OpenDocument
Parameter reference
1
Note:
Only one OpenDocument session can be created from a single browser
session.
If the new token parameter is incorrect and there is an existing user session,
OpenDocument will attempt to open the document using the current user
session. If it can't it will then prompt the user for credentials.
Parameter reference
This section provides details about the available OpenDocument parameters,
their specific uses, and relevant examples.
Note:
The document to which an OpenDocument link points to is referred to as the
target document.
Viewing Reports and Documents using URLs13
OpenDocument
1
Parameter reference
Table 1-1: Session Management Parameters
DescriptionParameter
token
Table 1-2: Document Identifier Parameters
iDocID
sDocName
sIDType
Specifies a valid logon token for the current
Enterprise session.
DescriptionParameter
Specifies the unique identifier of the viewable
document in the CMS. Use in conjunction with
sIDType.
Specifies the name of the viewable document
in the CMS. Use in conjunction with sPath
and sType.
Specifies the type of object identifier used to
specify the viewable document. Use in conjunction with iDocID.
Specifies the scheduled instance of the target
sInstance
sKind
14Viewing Reports and Documents using URLs
document to open. Use in conjunction with
sDocName or iDocID.
Specifies the file type of the target Desktop Intelligence document. Use in conjunction with
sDocName and sPath.
sPath
sType
Table 1-3: Input Parameters
lsC
OpenDocument
Parameter reference
DescriptionParameter
Specifies the name of the folder and subfolder
containing the target document. Use in conjunction with sDocName and sType.
Specifies the file type of the target document.
Use in conjunction with sDocName and
sPath.
DescriptionParameter
Specifies a contextual prompt for Web Intelligence documents if there is an ambiguity
during SQL generation.
1
lsM[NAME]
lsR[NAME]
lsS[NAME]
sPartContext
Specifies multiple values for a prompt.
[NAME] is the text of the prompt.
Specifies a range of values for a prompt.
[NAME] is the text of the prompt.
Specifies a value for a single prompt. [NAME]
is the text of the prompt.
Specifies the data context of a Crystal report
part. Use in conjunction with sReportPart.
Viewing Reports and Documents using URLs15
OpenDocument
1
Parameter reference
sRefresh
sReportMode
DescriptionParameter
Indicates whether a database refresh should
be forced when the target document is
opened.
Indicates whether the link should open the full
target Crystal report or just the report part
specified in.
sReportName
sReportPart
Table 1-4: Output Parameters
NAII
sOutputFormat
sViewer
Specifies the report to open if the target document contains multiple reports.
Specifies the part of the target Crystal report
to open.
DescriptionParameter
Indicates whether to force the display of the
prompt selection page for Web Intelligence
prompts.
Specifies the format in which to open the target document.
Specifies the selected report viewer.
16Viewing Reports and Documents using URLs
Session management parameters
token
OpenDocument
Parameter reference
ValuesDescriptionSyntax
1
token
Specifies a valid logon token
for the current Enterprise session.
Contains the logon token for the current user. This can be entered into an
OpenDocument URL to allow users to access files without being prompted
for credentials. Creating a new logon token uses up an additional licence.
Example:
The following example uses the BusinessObjects Enterprise Java SDK to
pass in a logon token to the OpenDocument URL. For more information on
the ILogonTokenMgr.createLogonToken method, see the
BusinessObjects Enterprise Java API Reference. You can create logon
tokens in a similar fashion using other BusinessObjects Enterprise SDK
platforms such as .NET and Web Services.
•Replace <server> with the server name and <port> with the port number
of your web server.
•The createLogonToken method allows you to specify the machine that
can use the token (which can be empty to allow any user to use the token),
the number of minutes the token is valid for, and the number of logons
that the token can be used for as parameters.
•Since an OpenDocument URL with a logon token contains the user
session, they must not be shared for security reasons.
Document identifier parameters
iDocID
ValuesDescriptionSyntax
Specifies the unique identifier
iDocID
You must include the iDocID or sDocName parameter in your
OpenDocument URL to specify the document to be viewed. Since there may
be multiple documents in the CMS with the same name, it is recommended
that you use iDocID to ensure uniqueness.
You can see identifier values for a document within the Central Management
Console (CMC) or InfoView applications. The properties page for each
document contains the document ID and the CUID. You can also obtain the
identifier programmatically using the BusinessObjects Enterprise SDK. For
example, in the Java SDK the com.crystaldecisions.sdk.occa.infostore.IInfoObject interface contains getID and getCUID methods
which you can pass to an OpenDocument URL.
18Viewing Reports and Documents using URLs
of the viewable document in
the CMS. Use in conjunction
with sIDType.
A numerical identifier associated with the document in the
CMS.
sDocName
OpenDocument
Parameter reference
Note:
If you pass in an InfoObject ID rather than a CUID, you do not need to specify
the sIDType parameter. However, InfoObject IDs are changed when
migrating documents from one CMS to another. It is recommended that the
CUID be used, which is preserved during migration.
Specifies the name of the
viewable document in the
CMS. Use in conjunction with
sPath and sType.
You must include the iDocID or sDocName parameter in your
OpenDocument URL to specify the document to be viewed. Since there may
be multiple documents in the CMS with the same name, and documents can
be moved or renamed, it is recommended that you use iDocID to ensure
uniqueness.
Specifies the type of object
identifier used to specify the
viewable document. Use in
conjunction with iDocID.
Note:
If you pass in an InfoObject ID as a value to iDocID rather than a CUID,
you do not need to specify the sIDType parameter. However, InfoObject
IDs are changed when migrating documents from one CMS to another. It is
recommended that the CUID be used, which is preserved during migration.
Specifies multiple values for a
prompt. [NAME] is the text of
the prompt.
separated by a comma.
•no_value (only for option-
al parameters)
Note:
You can remove an optional parameter from the prompt by setting it to
no_value in the openDocument query string. If you leave an optional
parameter out of the openDocument query string, a default parameter value
will be applied.
If the target is a Crystal report, each value must be enclosed in square
brackets.
Web Intelligence documents
The character ? is a reserved prompt value for Web Intelligence documents
in an openDocument URL. Setting the prompt value to lsM[NAME]=? in the
URL forces the "Prompts" dialog box to appear for that particular prompt.
Olap Intelligence reports
If the target document is an OLAP Intelligence report (.car) you can use the
IsM parameter to specify prompts. The parameters are passed in as a
URL-encoded string using the unique name of the parameter set up in the
OLAP Intelligence report.
This example opens up an OLAP Intelligence report with a memberset
parameter to Customers > Country > Mexico and Customers > Country >
Canada in the view.
Viewing Reports and Documents using URLs25
OpenDocument
1
Parameter reference
lsR[NAME]
ValuesDescriptionSyntax
lsR[NAME]
Specifies a range of values for
a prompt. [NAME] is the text
of the prompt.
Note:
Not supported by OLAP Intelligence reports.
Note:
You can remove an optional parameter from the prompt by setting it to
no_value in the openDocument query string. If you leave an optional
parameter out of the openDocument query string, a default parameter value
will be applied.
If the target is a Crystal report, the range must be enclosed in square brackets
and/or parentheses (use a square bracket next to a value to include it in the
range, and parentheses to exclude it).
ValuesDescriptionSyntax
1
lsS[NAME]
Specifies a value for a single
prompt. [NAME] is the text of
the prompt.
Note:
You can remove an optional parameter from the prompt by setting it to
no_value in the OpenDocument URL. If you leave an optional parameter
out of the OpenDocument URL, a default parameter value will be applied.
The character ? is a reserved prompt value for Web Intelligence documents
in an openDocument URL. Setting the prompt value to lsS[NAME]=? in the
URL forces the "Prompts" dialog box to appear for that particular prompt.
Viewing Reports and Documents using URLs27
OpenDocument
1
Parameter reference
OLAP Intelligence reports
If the target document is an OLAP Intelligence report (.car) you can use the
IsS parameter to specify prompts. The parameters are passed in as a
URL-encoded string using the unique name of the parameter set up in the
OLAP Intelligence report.
Example: Opening an OLAP report to a specific page
If 23CAA3C1-8DBB-4CF3BA%2CB8%2CD7%2CF0%2C68%2CEF%2C9C%2C6F is the URL-encoded
unique name for the page parameter in the OLAP Intelligence report, you
would use the following URL to open the OLAP Intelligence report to page
2:
If 8401682C-9B1D-4850-8B%2C5E%2CD9%2C1F%2C20%2CF8%2C1%2C62
is the URL-encoded unique name for the cube parameter opening the
warehouse cube in the catalogue FoodMart 2000 on MSAS, you would use
the following URL to open this cube parameter:
The sReportPart and sPartContext parameters are only supported
with the DHML parts viewer (sViewer=part).
ValuesDescriptionSyntax
Indicates whether a database
refresh should be forced when
the target document is
opened.
Viewing Reports and Documents using URLs29
•
Y
•
N
OpenDocument
1
Parameter reference
sReportMode
Certain documents can contain saved settings to specify that a database
refresh must occur when the document is opened in a viewer. These
document settings will override sRefresh=N.
The sReportPart and sPartContext parameters are only supported
with the DHML parts viewer (sViewer=part).
32Viewing Reports and Documents using URLs
Output parameters
NAII
OpenDocument
Parameter reference
ValuesDescriptionSyntax
1
NAII
Indicates whether to force the
display of the prompt selection
page.
Note:
Only supported by Web Intelligence documents.
Note:
•NAII=Y raises the "Prompts" dialog box for any values not specified in
the URL. Prompts created with default values are still displayed in the
"Prompts" dialog box.
•If all prompt values are specified in the URL, the prompt window does
not appear even if NAII=Y is specified.
Example:
This example assumes there are two prompts in the Web Intelligence
document: Year and Country. NAII=Y forces the "Prompts" dialog box
to appear and allows the user to specify a value for the Country prompt.
The Year prompt is already set to a value of FY1999 in the URL using the
lsS parameter and therefore is not prompted for.
•
Y (prompt values that are
passed with lsS, lsM, or
lsR in the URL are applied
and not displayed in the
"Prompts" dialog box)
This documentation provides you with information for constructing
parameterized URLs that link to Crystal reports in an BusinessObjects
Enterprise system. A command reference, including syntax and usage
examples, is provided for each URL command.
For information about deploying the CrystalReports web application (that
contains URL reporting) after the installation of BusinessObjects Enterprise,
see the BusinessObjects Enterprise Web Application Deployment Guide.
Who should use this documentation?
This documentation is for anyone creating URLs to Crystal reports with the
URL reporting syntax. We recommend consulting this guide if you are:
•Providing end users with hyperlinks to a Crystal report through email or
other direct means.
•Embedding hyperlinks in one Crystal report to another.
•Programmatically generating hyperlinks to Crystal reports in your custom
application.
Familiarity with the management and organization of the reports in your
BusinessObjects Enterprise deployment, as well as knowledge about Crystal
Reports design concepts are beneficial.
Note:
URL reporting only supports Crystal reports (.rpt). If you want to create URLs
to additional document formats, such as Web Intelligence documents,
Voyager workspaces, InfoView dashboards, or Xcelsius SWF files, use the
OpenDocument web application and its URL syntax and parameters. For
more information on OpenDocument, see About OpenDocument.
38Viewing Reports and Documents using URLs
About Crystal Reports URL reporting
Crystal Reports URL reporting (viewrpt.cwr) is one of many deployed
web applications within an BusinessObjects Enterprise system. It processes
incoming URL requests for Crystal reports in the Central Management Server
(CMS), and delivers the correct report to the end user in the appropriate
viewer. This allows you to send users direct links to a report and avoid having
them navigate through a folder hierarchy such as in InfoView. The URL
reporting syntax and its commands allow you to construct URLs that link to
these reports. For example, consider the following URL:
This URL accesses the report in the CMS with the unique identifier of 1783
and the report is rendered to the end user in a default Crystal Reports viewer.
In this example, id is one of many URL commands. These commands specify
how to access a particular report in the CMS, or determine how to display
the report to the end user. You can also automatically assign values for report
database authentication, parameter prompts, and selection formulas.
Crystal Reports URL Reporting
Getting started
2
The Crystal Reports designer provides a GUI-based editor to help you create
and embed hyperlinks to other reports and documents stored in the CMS.
Consult the Crystal Reports User's Guide for information on this feature.
What's new with Crystal Reports URL reporting
URL structure change in URL reporting
The virtual directory businessobjects is no longer created during installion
of BusinessObjects Enterprise. This affects the URL syntax for Crystal
Reports URL reporting.
Links to reports must use the new URL syntax, or you must create the
appropriate businessobjects virtual directory.
For information on supporting legacy URL Reporting applications with
Business Objects XI 3.0, refer to SAP Note ID: 1197099, on the SAP Notes
Database, here: https://websmp208.sap-ag.de/notes.
Please note that you will need your SAP Service Marketplace USER ID and
PASSWORD to access this material. If you do not have the necessary
credentials contact your SAP support center: https://web
sReportMode is a new URL command to view a Crystal Report in different
modes depending on the option passed to the command. Possible values
include:
•part displays part of a report using the parts viewer to render the report
•printlayout displays the report in a print preview layout
•weblayout displays the report as a web page layout.
Interactive Parameters
Parameters passed into the URL are always be applied to the report, even
if the report instance contains saved data. This is a change in behavior from
previous releases.
Migrating your links
In previous versions, URL Reporting was managed from the root folder and
therefore a request to http://<servername>/viewrpt.cwr or to any
virtual folder was supported. To increase security, the access of the request
has been reduced to a specific virtual folder. Due to this change, applications
that use URL reporting to link to reports in Crystal Enterprise deployments
40Viewing Reports and Documents using URLs
need to be updated to reference the specific BusinessObjects Enterprise
virtual folder.
If you do not want to change the calling application, you can configure the
web server to redirect requests to the default viewrpt.cwr virtual folder
location. For more information, refer to your web server or web application
server documentation.
URL syntax
Basic URL syntax
The following sections explains how to use URL reporting, and how to
construct the URL.
Crystal Reports URL Reporting
URL syntax
2
A URL reporting URL is generally structured as follows:
Variables are denoted with angle brackets. You must substitute the proper
value for these variables. For example, you must use the name of your server
where viewrpt.cwr is hosted in place of <servername> and you must
use the correct port number in place of <port> to access the viewrpt.cwr
web application.
Deployment
BusinessObjects Enterprise can operate with a Java Application server or a
.NET application server. Depending on where the application is configured
the server name and port number will be dependant on the web server,
however the calling convention is application server agnostic.
Viewing Reports and Documents using URLs41
Crystal Reports URL Reporting
2
Command reference
URL syntax considerations
You can pass URL reporting commands in any combination and order. All
commands are optional - except the id command. If you do not specify any
optional commands, the default viewer displays the report and prompts the
user for any required information.
Remember that a number of factors determine whether the user is prompted
for information when accessing a Crystal report by URL. The user is prompted
under the following circumstances:
•The report requires the user to enter parameter values or authentication
information.
•The report does not contain saved data; it needs to access a database.
•The user has refreshed the report; it needs to access a database.
•The values for the prompts have not already been set or the prompts
have been enabled through the SDK or CMC.
•If apstoken or apsuser, apspassword, and apsauthtype values
are not provided, the user is prompted to log on to the Central
Management Server (CMS).
Command reference
This section provides details about the available URL reporting commands,
their specific uses, and relevant examples.
Table 2-1: Authentication Commands
apstoken
42Viewing Reports and Documents using URLs
DescriptionCommand
Specifies a valid logon token for the current
Enterprise session.
Crystal Reports URL Reporting
Command reference
DescriptionCommand
2
apsuser, apspassword, apsauthtype
connect
PASSWORD
(see user# and password#
and user and password for
details)
USER
(see user# and password#
and user and password for
details)
Table 2-2: Document Identifier Commands
Specifies authentication credentials for logging on to a CMS.
Re-establishes a connection to the Page
Server.
Specifies logon credentials for the database
that is used by the report and its subreports.
Specifies logon credentials for the database
that is used by the report and its subreports.
DescriptionCommand
id
rptsrc
Specifies the unique identifier of the viewable
document in the CMS.
Specifies a session variable that references
a report source object.
Viewing Reports and Documents using URLs43
Crystal Reports URL Reporting
2
Command reference
Table 2-3: Input Commands
DescriptionCommand
gf
prompt# (Use Case 1)
promptex (Use Case 1)
promptOnRefresh
sf
sPartContext
Specifies a group selection formula for the
report.
Specifies values for parameter fields in a report. It is recommended that you use PROMTPEX instead.
Specifies values for parameter fields in a report and subreport. See also promptex (Use
Case 2), promptex (Use Case 3), and
promptex#.
Indicates whether the report should prompt
for parameter field values when refreshed.
Specifies a selection formula to further filter
records by.
Specifies the data context of a report part.
Use in conjunction with sReportPart.
sReportMode
sReportPart
44Viewing Reports and Documents using URLs
Specifies the mode to display the report in.
Specifies the part of the target report to view.
Table 2-4: Output Commands
cmd and EXPORT_FMT
EXPORT_OPT
Crystal Reports URL Reporting
Command reference
DescriptionCommand
Specifies that the report be exported to the
indicated format. Used in conjunction with
EXPORT_OPT.
Specifies the range of pages in the report to
export. Used in conjunction with cmd=EXPORT
and EXPORT_FMT.
2
init
sZoom
Authentication commands
apstoken
apstoken
Contains the logon token for the current user. This can be entered into the
URL to allow users to access a report without being prompted again for
credentials. Creating a new logon token uses up an additional licence.
Specifies a valid logon token
for an Enterprise session.
Specifies the viewer to display the report with.
Specifies the magnification percentage to
display the report at.
ValuesDescriptionSyntax
The logon token for the current
Enterprise session.
Viewing Reports and Documents using URLs45
Crystal Reports URL Reporting
2
Command reference
Example:
This example uses the BusinessObjects Enterprise Java SDK to pass in a
logon token to the URL. For more information on the ILogonTokenM
gr.createLogonToken method, see the BusinessObjects Enterprise
Java API Reference. You can create logon tokens in a similar fashion using
other BusinessObjects Enterprise SDK platforms such as .NET and Web
Services.
You may need to use these commands under special circumstances, such
as when a user receives a report through email and must log on to the CMS
to view it. In most cases, however, it is recommended to use the apstoken
command to pass a valid Enterprise session to your URL.
46Viewing Reports and Documents using URLs
dentials for logging on to a
CMS.
ValuesDescriptionSyntax
Valid user name, password,
and authentication type (se
The connect command re-establishes a connection to the Page Server and
must be appended to the INIT command. By re-establishing a connection to
the Page Server, the connect command allows the user to reset the report's
parameters and logon information, and re-process the report if
necessary—without the need to start a new browser session.
That is, if you use viewer A to display a report, and then you specify viewer
B to view the same report in the same browser session, you will not be
prompted for parameter values or database logons, and a new report job
will not be opened. But, if you specify ":connect" along with the request for
viewer B, the connection to the Page Server will be re-established. That
means, if necessary, the user will be prompted for parameter values and
logon information, and the report will be run again.
Note:
When you re-establish a connection to the Page Server with the connect
command, the report is not refreshed against the database. While the
connection to the Page Server enables the user to reset parameter values
and view a different set of information, if the report contains saved data, it
will not access the database for that information. For more details on
refreshing a report, see the BusinessObjects Enterprise Java SDK DeveloperGuide.
Re-establishes a connection
to the Page Server.
N/A
Viewing Reports and Documents using URLs47
Crystal Reports URL Reporting
2
Command reference
Example:
This example specifies that the report will re-establish its connection to the
Page Server once the URL has been processed:
Sending a password over the URL is not secure. It is strongly recommended
that the database logon information is set through the Central Management
Console (CMC).
Example:
This example shows how to pass the following values to the primary report:
48Viewing Reports and Documents using URLs
Crystal Reports URL Reporting
Command reference
•
Server name: "systemdsn".
•
Database name: "xtreme".
•
user name: "vantech".
•
password: "1234".
Note:
For Oracle databases, substitute the schema name for the database name.
Sending a password over the URL is not secure. It is strongly recommended
that the database logon information is set through the Central Management
Console (CMC).
Example:
This example passes user name "msmith" and the password "1234" to the
report:
Specifies logon credentials for
the database that is used by
the report and its subreports.
Database user name and
password.
50Viewing Reports and Documents using URLs
If the report accesses more than one password-protected database, you
can pass multiple user names and passwords, by incrementing the user
and password index number:
You can specify passwords in the URL in any order. For example, password1
can appear before password0. However, index numbers must match the
order of password-protected databases that appear in the report.
Document identifier commands
id
Crystal Reports URL Reporting
Command reference
2
id
ValuesDescriptionSyntax
Specifies the unique identifier
of the viewable document in
the CMS.
You can see identifier values for a document within the Central Management
Console (CMC) or InfoView applications. The properties page for each
document contains the document ID. You can also obtain the identifier
programmatically using the BusinessObjects Enterprise SDK. For example,
in the Java SDK the com.crystaldecisions.sdk.occa.infostore.IInfoObject interface contains a getID method which you can
pass to the URL.
A numerical identifier associated with the document in the
CMS.
Crystal Reports URL Reporting
2
Command reference
rptsrc
rptsrc
You can save a programmatic report source as a session variable in your
web application and pass this session variable to viewrpt.cwr using the
rptsrc command. Use this command if you are programmatically modifying
the report at runtime before redirecting to a viewrpt.cwr URL. Otherwise,
it is recommended that you use the id command instead to access a report
in the CMS. The report source class and method to retrieve it depends on
the platform and SDK you are developing your application with. For example:
•Using the Report Application Server (RAS) Java SDK:
Specifies a session variable
that references a report source
object.
ValuesDescriptionSyntax
Name of the report source.
The com.crystaldecisions.sdk.occa.report.application.Re
portClientDocument.getReportSource method returns a
com.crystaldecisions.sdk.occa.report.reportsource.IRe
portSource report source object.
•Using the Report Application Server (RAS) .NET SDK:
The CrystalDecisions.ReportAppServer.ClientDoc.Report
ClientDocument.ReportSource property returns a CrystalDeci
sions.ReportAppServer.Controllers.ReportSource report
source object.
Note:
You must deploy and configure your custom web application that retrieves
and saves the report source object along with the CrystalReports web
application that contains viewrpt.cwr. The two applications must be able
to share the same session data for the rptsrc command to work. For
information about deploying the CrystalReports web application after the
installation of BusinessObjects Enterprise, see the BusinessObjectsEnterprise Web Application Deployment Guide.
52Viewing Reports and Documents using URLs
Example:
This example code snippet assumes you already have an IReportSource
java object called reportSource and are saving it as a session variable
in a JSP page.
Specifies a group selection
formula for the report.
Note:
•Pages are shared between reports that have the same sf and gf
commands applied and that do not require logon information.
•You cannot use the gf command with the DHTML viewer. You must
specify the init command in your URL and choose the ActiveX or Java
viewer.
Viewing Reports and Documents using URLs53
A valid Crystal Reports group
selection formula.
Crystal Reports URL Reporting
2
Command reference
Example:
This example shows how to pass a group selection formula that selects all
groups where the sum of all customer sales in each region is greater than
10,000:
Specifies each parameter by
value. Parameter values are
specified that way in earlier
versions of Crystal Reports
(for example, Crystal Reports
7). While it is not recommended, parameter values can still
be specified that way.
If the report contains more than one parameter field, you can pass multiple
values to parameters by incrementing the prompt# index value. For example,
prompt0=CA&prompt1=1000. You can pass NULL values to a parameter
by leaving the right-hand side of the statement blank. For example,
prompt0=&prompt1=1000 sets prompt0 to NULL. You can specify prompts
in the URL in any order; for example, prompt1 can appear before prompt0.
However, index numbers must match the order of the prompts that appear
in the report.
Note:
•Parameters passed into the URL are always be applied to the report,
even if the report instance contains saved data.
A string (potentally empty) that
is the new value of the prompt.
Values are assigned to parameters in the same order that
they appear in the report. Do
not use quotation marks
around parameter values to
indicate string values.
54Viewing Reports and Documents using URLs
•Reports that have the prompt# command applied do not have their pages
shared. Caching will be by user. That is, a page that is stored in the cache
is reserved for the user who last viewed it.
•The prompt# command can only be used to pass values to parameters
in the main report. You must use the prompt command or the promptex
command to pass values to parameters in a subreport.
Example:
This example uses prompt# to pass "CA" as a value to the first parameter:
•Parameters passed into the URL are always be applied to the report,
even if the report instance contains saved data.
•Reports that have the prompt# command applied do not have their pages
shared. Caching will be by user. That is, a page that is stored in the cache
is reserved for the user who last viewed it.
Specifies Date or DateTime
parameter values. Parameter
values are specified that way
in earlier versions of Crystal
Reports (for example, Crystal Reports 7). While it is not
recommended, parameter
values can still be specified
that way.
Viewing Reports and Documents using URLs55
Date or DateTime parameter
values. For single value Date
or DateTime parameters, the
prompt# command does not
require double quotes.
Crystal Reports URL Reporting
2
Command reference
•The prompt# command can only be used to pass values to parameters
in the main report. You must use the prompt command or the promptex
command to pass values to parameters in a subreport.
Example:
This example passes a Date value of February, 02, 2002 for the second
parameter within a report:
•If an existing report is inserted as the subreport, the subreport name includes
the file extension (.rpt). However, the file extension may be missing from
the subreport name, if the subreport was created inside the main report
(using the Report Expert to create the new report, and then using Insert
Subreport). In that case, the subreport name appears as
"user0@subreportname," unless an extension is added in the "Report Name"
text box of the Insert Subreport dialog box.
•A backslash (\) acts as an escape, so it is substituted by the character that
follows it. Quotation marks and backslashes must be escaped because they
are reserved URL characters. You must escape "@", "." or "\" when they
are used in the subreport name, server name, database name or parameter
name.
that represent names of a parameter field prompt and a
subreport, which are defined
in the report. <value A>,
<value B>, and <value C>
are strings. See table below
for interval bounding.
Viewing Reports and Documents using URLs57
Crystal Reports URL Reporting
2
Command reference
Note:
Parameters passed into the URL are always be applied to the report, even
if the report instance contains saved data.
Example:
This example below specifies "Apples, Oranges, and Grapes" as values
for the parameter called "fruits":
A square bracket indicates that the interval is closed at that end, and that
the specified number is included in the range; a round bracket indicates
that the interval is open at that end, and that the specified number is not
included in the range. For example:
Parameters passed into the URL are always be applied to the report, even
if the report instance contains saved data.
Specifies Date or DateTime
parameter values, using the
Single Value or Date Range
methods.
Viewing Reports and Documents using URLs59
ValuesDescriptionSyntax
Date or datetime parameters
passed. A specific date or date
range can be passed. For single value Date or DateTime
parameters, double quotes are
required.
Crystal Reports URL Reporting
2
Command reference
Example:
To pass a Date value of February, 02, 2002 for the "birthdate" parameter,
use the following URL command:
This example shows that "DateRangeParameter" is the parameter name;
the square brackets that surround the values indicate that the specified
date is included in the range:
The type of brackets that surround the date value can specify whether the
value should be included or excluded from the date range:
•
Square brackets [ ] that surround the values indicate that the specified
date is included in the range.
•
Round brackets ( ) that surround the values indicate that the specified
date is excluded in the range.
60Viewing Reports and Documents using URLs
promptex#
promptex#
The promptex# command is
an enhanced version of the
older prompt# command. In
the enhanced notation, quotation marks are used around
parameter values to indicate
string values. All parameter
values are passed to the report as strings, and intended
numeric values are translated
from strings to numbers by the
report.
Crystal Reports URL Reporting
Command reference
ValuesDescriptionSyntax
<promptname> and <sub
rpt> are non-empty strings
that represent names of a parameter field prompt and a
subreport, which are defined
in the report. <value> is a
single or multivalued string.
2
If the report contains more than one parameter field, you can pass multiple
values to parameters by incrementing the prompt# index value. For example:
promptex0="CA"&promptex1="1000". You can specify prompts in the
URL in any order; for example, promptex1 can appear before promptex0.
However, index numbers must match the order of the prompts that appear
in the report.
Note:
•Parameters passed into the URL are always be applied to the report,
even if the report instance contains saved data.
•Reports that have the promptex# parameter applied do not have their
pages shared. Caching will be by user. That is, a page that is stored in
the cache is reserved for the user who last viewed it.
•The promptex# command can only be used to pass values to parameters
in the main report. You must use the prompt command or the promptex
command to pass values to parameters in a subreport.
Viewing Reports and Documents using URLs61
Crystal Reports URL Reporting
2
Command reference
Example:
This example passes "CA" as a value for the first parameter in the report:
Selection formulas that are passed through the URL with the sf command
will be appended to selection formulas that are already contained in the
report. That is, the generated report will be based first on existing selection
Indicates whether the report
should prompt for parameter
field values when refreshed.
Specifies a selection formula
to further filter records by.
Value must be either 0 or 1. 0
is for false and 1 is for true.
ValuesDescriptionSyntax
A valid Crystal Reports selection formula.
62Viewing Reports and Documents using URLs
Crystal Reports URL Reporting
Command reference
formulas saved with the report, and the selection formula specified by the
sf command will be applied against that set of records.
For example, assume a report already contains a selection formula that
selects the records for film studios in the state of California. The sf command
is then used to append a formula that selects the records for a particular
studio such as "Universal". Information on that particular studio will be
displayed if there are studios with a value of "Universal" in the state of
California. However, if the sf command specifies a studio value that does
not exist in the subset of records already selected according to the state of
California, the requested report would contain no data.
Note:
The new selection formula is not saved with the original report file. It is only
valid for the current URL request.
An integer value for the magnification percentage. Defaults
to 100 if not specified.
More Information
A
More Information
A
LocationInformation Resource
SAP BusinessObjects product
information
SAP Help Portal
SAP Service Marketplace
http://www.sap.com
Select http://help.sap.com > SAP BusinessObjects.
You can access the most up-to-date documentation covering all SAP BusinessObjects products and their deployment
at the SAP Help Portal. You can download PDF versions
or installable HTML libraries.
Certain guides are stored on the SAP Service Marketplace
and are not available from the SAP Help Portal. These
guides are listed on the Help Portal accompanied by a link
to the SAP Service Marketplace. Customers with a maintenance agreement have an authorized user ID to access
this site. To obtain an ID, contact your customer support
representative.
The SAP Service Marketplace stores certain installation
guides, upgrade and migration guides, deployment guides,
release notes and Supported Platforms documents. Customers with a maintenance agreement have an authorized
user ID to access this site. Contact your customer support
representative to obtain an ID. If you are redirected to the
SAP Service Marketplace from the SAP Help Portal, use
the menu in the navigation pane on the left to locate the
category containing the documentation you want to access.
These articles were formerly known as technical papers.
https://service.sap.com/notes
These notes were formerly known as Knowledge Base articles.
https://www.sdn.sap.com/irj/scn/forums
http://www.sap.com/services/education
From traditional classroom learning to targeted e-learning
seminars, we can offer a training package to suit your
learning needs and preferred learning style.
http://service.sap.com/bosap-support
The SAP Support Portal contains information about Customer Support programs and services. It also has links to
a wide range of technical information and downloads.
Customers with a maintenance agreement have an authorized user ID to access this site. To obtain an ID, contact
your customer support representative.
Consultants can accompany you from the initial analysis
stage to the delivery of your deployment project. Expertise
is available in topics such as relational and multidimensional
databases, connectivity, database design tools, and cus
tomized embedding technology.