Archive for March, 2011

Hyperlink to open mulitple Web Intelligence documents by Open document functionality

Open document syntax to open multiple reports in single hyperlink

we can link two or more reports in a single hyperlink, this can be achieved by injecting an javascript inside the open document URL.

let me first tell some basics of Open document functionality which is as follows,

The syntax for an OpenDocument URL is as follows:


The exact syntax of the <platformSpecific> parameter depends on your
SAP 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.

<parameter1><parameter2> can be the values that you are going to pass the next report.

we can briefly get a  knowledge on open document from the following link.

When we create an hyperlink from infoview by options, we will get a  “<a href >/…/…/ </a>” link , and its slightly different from this procedure of creating a hyperlink. Here we replace the auto generated link script by the open document syntax with the javascript.

Normal link to open a SINGLE document:

=<a href=’http://<servername&gt;:<port>/OpenDocument/opendoc/<platform
Specific>?<parameter1>&<parameter2>&…&<parameterN’>“+”Your Object or text here”+”</a>”

The javascript to open two documents,

=”<a href=’#’ onclick=\”‘Open document for Report 1’);‘Open document for Report 2’)\”>”+”Your Object or text here”+”</a>”

For example, i have implemented this using sample universe called Efashion, where i created three report, the first one is the main Report in which hyperlink is created and second, third reports are the connected reports,

the opendocument syntax for connecting two reports is shown below, we can also pass different set of parameters to different reports using this link.

=”<a href=’#’ onclick=\”‘http://<server name>:<port>/OpenDocument/opendoc/openDocument.jsp?iDocID=Afkjn4VJ.fqpsHqcigddiP5iOlwE&sIDType=CUID&sType=wid&sRefresh=N&lsSEnterYear%3A=”+[Year]+”‘);‘http://<server name>:<port>/OpenDocument/opendoc/openDocument.jsp?iDocID=AsdLLgIffJn7fXJCv85q2wssVZlOo&sIDType=CUID&lsSEnterYear%3A=”+[Year]+”&lsSEnterQuarter%3A=”+[Quarter]+”‘)\”>”+[Year]+”</a>”

Another Best Practice about creating prompts, especially while creating hyperlinks is,

when we create hyperlink sometimes there will be a need to pass parameters as a prompt to the next report, its better to create the prompt name without any spaces as like in above link (EnterYear and EnterQuarter)

you can see there are no spaces between ‘Enter’ and ‘Year’, this will reduce the risk on %20 and some notations for spaces on link because we are manually writing the open document syntax, so it will become more tedious when we try to add %3A’s and %20’s for spaces. so its better to avoid spaces in prompt names.

Now if we click on the object, it will open two Reports at a time with different or same parameters passed.

we can directly enter the open document syntax in the formula bar as shown in above screen shot.

Using this javascript, we can also add other mouse events like onclick(),ondblclick(),onmouseover() and functions like prompt(),alert() etc




%d bloggers like this: