If you are unable to create a new account, please email support@bspsoftware.com

 

How to download report as PDF while filtering with p_param?

Started by Eag. E, 13 Mar 2018 09:17:00 PM

Previous topic - Next topic

Eag. E

Hi,

I got one question on how to downloading (PDF) with parameter. Would somebody help please?

### STORY ###
We have embed CA report into our own portal using iframe, following UI request we have disabled ui_appbar and ui_navbar (&ui_appbar=false&ui_navbar=false). The report is ok and the prompt_value works in HTML.

But as there is no appbar and navbar, we can no longer choose to download the report (Excel or PDF), the workaround provided by IBM is to "add a link of PDF's url", it works for no_prompt_value reports, but it seems like no parameter can pass to PDF.
### END ###

Brief, customer select prompt value in embeded report, eg p_param='abc', then click download button (or link), to run this report as PDF/Excel only with 'abc'.

Thanks

Eag.

rteruyas

I have a couple of ideas to do so:

1. Create a link on your portal to generate the report in PDF format.
Use the following link to build your custom URL
https://www.ibm.com/support/knowledgecenter/en/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.wig_cr.doc/c_wig_cr_create_custom_url.html

2. In your HTML report add a link to the pdf file so you can open the iframe with the HTML version, and then click on the link to download/open the PDF version

Let me know how it works
Happy reporting!
Happy Reporting!
[Ray]

Eag. E

Hi Rteruyas

Thanks for your ideas.
I did try with this, creating link (of PDF/Excel) is perfect for report with no prompt_value. But when prompt_value exist, the p_param is hard to add.

I will give you the example: a report of all products, end-user-A will select only Shoes then generate PDF/Excel, while end-user-B will select Clothes. The link of PDF/Excel could be found in report's share but without customrized parameter.

BR

rteruyas

Quote from: Eag. E on 15 Mar 2018 07:07:22 PM
But when prompt_value exist, the p_param is hard to add.

Can you show me how you're building the URL?
if the param name is "p_param", then you need to build the url as:

http://<servername>:<port>/bi/?objRef=i000000000000000&p_p_param=abc
Happy Reporting!
[Ray]

rteruyas

Second thought:

You can add a text "Click to PDF" and use that to drill through to self report.
Check the settings here: http://imgur.com/a/jYyKR
You'll find an example using sample data attached
Happy Reporting!
[Ray]

Eag. E

Quote from: rteruyas on 16 Mar 2018 08:02:09 AM
Can you show me how you're building the URL?
if the param name is "p_param", then you need to build the url as:

http://<servername>:<port>/bi/?objRef=i000000000000000&p_p_param=abc

I got the URL from report-->properties -->share-->URL, this URL has no parameters added.So logically I need to add p_param=abc at last, but the abc come customer's select result, that brings the problem.

Eag. E

Quote from: rteruyas on 16 Mar 2018 08:36:08 AM
Second thought:

You can add a text "Click to PDF" and use that to drill through to self report.
Check the settings here: http://imgur.com/a/jYyKR
You'll find an example using sample data attached

IT WORKS VERY WELL

thanks very much

rteruyas

Glad to help!  ;D

Now for the "cleanup" part: The link will also appear in the PDF version (which doesnt make much sense)
You should add a render variable (boolean) with something like reportOutput()='HTML'

https://www.ibm.com/support/knowledgecenter/SSRL5J_1.0.1/com.ibm.swg.ba.cognos.ug_fm.10.1.1.doc/c_crx_reportoutput.html

Bon weekend!
Happy Reporting!
[Ray]