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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

passing param value through hyperlink button URL (SOLVED)

Started by hanfrie, 08 Apr 2016 08:27:28 AM

Previous topic - Next topic

hanfrie

After endless trial and errors and searches on the internet I'm forced to turn to you out there. Has anyone mastered the skill how to send an existing parameter value to another report using a hyperlink?

My situation: I'm using Report Studio version 10.2.1, and made a report which uses a prompt page. On this prompt page there are multiple prompts; one value prompt asks for the appropriate period ID, i.e. a single value in the range of 20141200, 20150100 and so forth up to the current yearmonth00. This value is used as a cascade source for a Select & Search prompt. No troubles there. The first value is put in the parameter named "period_prompt", the selected value in the first Select & Search prompt is put in the parameter named "Hfdrel". In order to pre-validate the values to be selected in a second Select & Search prompt on the same prompt page, I need to run a second report that uses the same two input parameters as in the first report, "period_prompt" and "Hfdrel". To do that I created a Hyperlink button on the prompt page, in which I tended to use both existing parameters to pass the selected values to the second report. And that's were I strand. I can get the link working when I use plain values in the definition of my URL. For instance, when I end the URL with "&p_Period=20151200" (no other parameter values) it starts with the prompts of the second report and asks for promptvalues for the two prompts "Period" and "CustomerID", in which the "Period" prompt indeed uses the value "20151200".  (fyi: In the link I intently didn't change "&run.prompt=true" into "&run.prompt=false" just to be able to see what happens.)

The question is: what to change in the URL, "&p_Period=20151200", so that it uses the value from the parameter "period_prompt"?

I tried all kinds of values like "&p_Period=ParamDisplayValue('period_prompt')",  "&p_Period=+ParamDisplayValue('period_prompt')", "&p_Period=ParamUsedValue('period_prompt')", "&p_Period='period_prompt'" etc. etc. but in those cases nothing happens when I use this, so it seems that the resulting URL itself is then invalid.

I am now thinking to rebuild my first report so that it somehow incorporates the second report, bypassing the need of running a second report through a hyperlink, but I sure do want to be able  to use this correctly, and it is a whole lot of extra work to rebuild.

regards
hanfrie

Lynn

Do you have the Source Type property for the URL Source set as Report Expression? Enclose the URL in single quotes and then append the parameter details. I also ensured that the URL has &run.prompt=false


'http:// your url' + '&p_YourParameter=' + ParamValue('YourParameter')

hanfrie

I changed the Source Type property and the code accordingly, and then it finally worked. Happy with that!  :)
But then there was a second parameter that needs to be passed through. This parameter is filled by a Search & Select prompt on the same prompt page. And I can't get this to work. After hours of searching and trial and error sessions I finally learned that this particular parameter is only filled after performing a REPROMPT. Of course I can add a REPROMPT button, next to the existing hyperlink button that will run the report, but wouldn't it be nice when this could be incorporated in one button?
I am able to create a custom button that performs the REPROMPT, but how to incorporate the function of running the report through a URL?

ramaanujamr

Hi,

I am able to send param value to second report. Second report execute based parameter value.

My date prompt is on my report layout page ( not prompt page). First user run the first report and if they select date from the page and click on the hyperlink button , then it should open my second report based on date parameter value
So i what i did..
in my first report next to date prompt. I added hyperlink and passed

'https://dev:443/analytics/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder%5b%40name%3d%27Test%27%5d%2freport%5b%40name%3d%27Htest2yperlink%27%5d&ui.name=Htest2yperlink&run.outputFormat=&run.prompt=false'+ '&p_date1=' + ParamValue('date1')

it open next(run) second report if i dont pass parameter value. If i add parameter value it just stay nothing is happening. It does not open the second report.

Please guide me.

Thanks.