Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Hyperlink not passing parameter value to report
nikodem38
Hi,
I need to open report design RPT2 by cliking a label in report design RPT1.
Parameter PRM is needed in RPT2.
My constraint is that I must create the hyperlink with javascript.
Here is the javascript code of RPT1:
elementFactory = reportContext.getReportRunnable().designHandle.getElementFactory();
label = elementFactory.newLabel("LBL");
label.setText("labeltxt");
ac = StructureFactory.createAction();
ah = label.setAction(ac);
ah.setLinkType("drill-through");
ah.setReportName(RPT2);
ah.setTargetFileType("report-design");
ah.setTargetWindow("_blank");
pb = StructureFactory.createParamBinding();
pb.setParamName("PRM");
pb.setExpression(prmvalue);
ah.addParamBinding(pb);
reportContext.getReportRunnable().designHandle.getBody().add(label);
When I run RPT1, the label is well displayed with an underline for the hyperlink.
But when I click the label, the parameter window pops up with value blank.
I don't want this window to open. I need the parameter to be automatically passed to RPT2.
Please help
Nicolas
Find more posts tagged with
Comments
kclark
Try changing<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
pb.setExpression(prmvalue);
</pre>
<br />
to<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
pb.setExpression(params["prmvalue"]);
</pre>