发表于: 2008.05.11 14:21
分类: 数据仓库
出处: http://lynx286.itpub.net/post/341/461704
---------------------------------------------------------------
*****************************************
lynx286原创, 首发www.mydwbi.com
http://www.mydwbi.com/forums/show/5.page欢迎转贴, 但转贴请不要删除此段版权说明.
*****************************************
How to use hyperlink in BO report
*****************************************
lynx286原创, 首发www.mydwbi.com
http://www.mydwbi.com/forums/show/5.page欢迎转贴, 但转贴请不要删除此段版权说明.
*****************************************
Sometimes you need to use a hyperlink to open a sub report or a related report and pass some parameter values into its prompts. Now I am introducing you two method of create hyperlink in BO report, and sharing some experience with you.
When you use hyperlink in web intelligence report (webi), you can use:
openDocument.jsp and openAnalytic.jsp.
- First, you need to add a variable to the webi through three ways below:
- Add a dimension to the universe; put the link text into the “select” clause.
Figure – 1
- Modify the webi; click the icon, to create a variable.( recommend)
Figure – 2
- Add a blank cell, and define its “fx”.
Figure – 3
- Second, you must write a correct link sentence.
openDocument is an old way of link report; it can’t link to an analytic report. The syntax of openDocument you can see this document:
(be_xi_r2_opendocument.pdf)
I don’t want to talk more about the syntax; the experience and ideas is the most important.
openAnalytic is a feature of performance management framework, the link address can auto generate by creating an analytic with the following steps:
- In the infoview, click 【new】, 【Analytic】, 【 Interactive Metric Trends】, 【Navigation and Legend Options】, 【Browse】.Then you can see the link in the textbox as below:
Figure – 4
Then you can copy the link and close the create analytic window.
Link Example: openAnalytic.jsp?DocumentName=Andy%26%2339%3Bs+test&RepositoryType=C&RepositoryName=Performance+Management&DocumentExt=afd&DocumentId=AcQbXi6EL5pClE8IOi49Bvg&mode=full
Note: To use this, you must install performance management module.
- Third, set the property “Read cell content as” as “HTML”
Figure – 5
When you use hyperlink in desktop intelligence report (deski), you can use:
Hyperlink () function
If the main report is a deski, you can use Hyperlink () function to open the relation report.
For example: you create a variable in Designer, and define the formula as below:
=Hyperlink("http://tybw191020:8088/businessobjects/enterprise115/desktoplaunch/viewers/cdz_adv/viewCDZDocument.jsp?id=5690&kind=FullClient&iventrystore=widtoken&ViewType=H&entSession=CE_ENTERPRISESESSION&lang=en&doctype=rep&useCustomPrompts=N" ,"CA Exception Report")
Figure – 6
But this method has two disadvantages:
- Can’t use relative path.
You must write the link begin with http://IP:port/xxx ,so if you migrates the report to another server, this link will can’t work.
· Can’t define target parameter.
All BO’s reports are in HTML frames. So you must define the target parameter as “target=_parent” .Otherwise, when you click some times you can get a result as below:
Figure – 7
Some tips with BO’s hyperlink
- openDocument.jsp and openAnalytic.jsp are case sensitive.
Because java’s file name is case sensitive, this is java’s policy.
- Use relative path in link, it needn’t to modify if you migrates the report.
- Use document ID instead of document name and RepositoryName to identify a report in links.
Because you may rename the report or move the report to another folder, thus, the links will can’t work. But the document ID never be changed.
There are at least two ways to find the document ID:
- http://ip:port/businessobjects/enterprise115/adminlaunch/query/logonform.jsp
writes a sql “SELECT SI_ID FROM CI_INFOOBJECTS WHERE SI_NAME LIKE '%test%'” in the text area, then submit the query, then you can get the id. - Enter BO CMC, click 【Folders】【HLC Dashboard】【testlink】,then you can see
File Name: | frs://Input/a_212/010/000/2772/cdzb44c90fe185512.wid |
The “2772” is the document id.
- Use target parameter to open the report in its parent frame.As figure–7 shows, you must define target=_parent to avoid nested frames. But if your webi report has analysis context as figure-8 shows, you defined a link on this report, and you have used “target=_parent“, but that doesn’t work, the report still in nested frames! This because there are at least 3 frames as figure-8 show, your link in “frame 1”, use target=_parent only open the report in “frame 2”, actually, you want to open the report in “frame 3”.To resolve this problem, you can use <a href=javascript:window.parent.parent.location.href='xxxxx’>
Example:
="■ There are <a href=javascript:window.parent.parent.location.href='../../jsp/openAnalytic.jsp?DocumentName=Over+CA+Annual+Cap&RepositoryType=C&RepositoryName=HLC&DocumentExt=wid&DocumentId=AZfml0lvzx5DnYieE2D7VRY&mode=full&Enter_Year:="+UserResponse([OverCACap];"Enter the Year inquired")+"'>"+[OverCACap].[CountExpAmt]+"</a> HCPs Over CA Annual Cap"
Figure – 8
- Answer nested prompt.
If you define a condition in dimension (In universe create dimension window, open “Properties” tab, click “Edit…” add a condition), and define a filter in this dimension that can come into being a nested prompt.
For example, as figure-9 shows, if want to input an “hccp id” (a doctor), it will ask you which state are the doctor in at first, when you select a state, it then list all of the doctors in this state for you to choose.
Figure – 9
Ok, for figure-9 example, I only want to point out that you needn’t care the state id parameter; you just pass “Hcc Piid” and “year” parameter, that’s enough!
- Can’t use filter.
If you want to pass some parameters to a sub report, you shouldn’t drag filters from universe to sub report’s “Query Filters” as figure-10 shows, you must use dimension equal to prompt as figure-11 shows.
I don’t know weather BO or me is a stupid.
Figure – 10
Figure – 11
Now, after all of these accomplished, you can link from a report to another report and pass parameters. Just enjoy your great works!











