COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: jaganlalrm on 03 Jun 2013 07:04:36 AM

Title: Display Drop down VAlues
Post by: jaganlalrm on 03 Jun 2013 07:04:36 AM
Hi

    How to Display the Selected Drop Down value in PDF while downloading. 

     Please Suggest me any method

Thanks in advance
Title: Re: Display Drop down VAlues
Post by: MFGF on 03 Jun 2013 07:45:54 AM
Hi,

I imagine you have an inline prompt in your report page, which isn't getting rendered when you view PDF output - is that what you mean? If so, add a Layout Calculation and for the expression, simply drag in the parameter the prompt uses. You will end up with an expression that uses the ParamDisplayValue() function. This will show the value selected in the parameter.

Cheers!

MF.
Title: Re: Display Drop down VAlues
Post by: jaganlalrm on 03 Jun 2013 08:13:00 AM
Hi MFGF,

        I need as you said this error occurs RSV-VAL-0032 

         What shall i do now?

Thank in Advance

       
Title: Re: Display Drop down VAlues
Post by: Lynn on 03 Jun 2013 08:35:09 AM
You should look at the details of the error message to see if there is any further information. You should google and/or search within Cognoise to see if the issue has already been posted with a resolution.
Title: Re: Display Drop down VAlues
Post by: jaganlalrm on 03 Jun 2013 08:36:00 AM
hi

i have corrected the error. Now its showing the value of the parameter and its not showing displayed value

While loading first it display -1 value instead i have display value
 
  Now i want to display the Drop down display value in PDF

Thanks in advance
Title: Re: Display Drop down VAlues
Post by: Lynn on 03 Jun 2013 08:40:18 AM
There are two functions to show parameter information:

ParamValue('YourParameter') will show the "use" value of the parameter.
ParamDisplayValue('YourParameter') will show the "display" value of the parameter.

Not really sure what your issue is.
Title: Re: Display Drop down VAlues
Post by: MFGF on 03 Jun 2013 09:12:09 AM
As Lynn says - there are two functions for displaying parameters - ParamValue() and ParamDisplayValue(). Can you share with us the expression you are using in your layout calculation? If you look at the properties of the prompt on the report page, is it using the same parameter you have included in the layout calc?

Cheers!

MF.
Title: Re: Display Drop down VAlues
Post by: jaganlalrm on 03 Jun 2013 09:36:42 AM
Hi

          ParamDisplayValue('sample') am using this param only. When the report load first it shows the default value '-1' i want to
   
          Change the value and i have customized it

           And other Problem i dont want to display the value in report while downloading only i have view the Club name

Thanks in Advance
Title: Re: Display Drop down VAlues
Post by: MFGF on 03 Jun 2013 09:47:12 AM
I'm not quite clear on what you are saying, sorry. When the report first runs, I imagine a default value for the parameter is set automatically to -1? If so, I would expect this to display in your calculation if you render the PDF without selecting a different prompt value. What happens if you pick a different value from the prompt and then choose the "view in PDF Format" option from the rendering type button in the top right corner of the Cognos Viewer window? Do you get the desired value displayed?

MF.
Title: Re: Display Drop down VAlues
Post by: jaganlalrm on 03 Jun 2013 10:08:08 AM
Yes if i select any other i get desired value. Now i have correct problem. By checking Condition in Regular Expressions.

Now the problems is while downloading only i have see Layout Calculation Value while report rendering in html i should not see
the value. Please Tell me the solution for this.
Title: Re: Display Drop down VAlues
Post by: Lynn on 03 Jun 2013 10:11:04 AM
Create a boolean variable with the expression: ReportOutput () = 'PDF'

Then set this as the render variable for your layout calculation.
Title: Re: Display Drop down VAlues
Post by: jaganlalrm on 03 Jun 2013 10:20:46 AM
Hi

        If i want to display the value except then HTML in others XML, EXCEL, CSV and PDF  means what i should

Thanks in Advance
Title: Re: Display Drop down VAlues
Post by: Lynn on 03 Jun 2013 10:37:17 AM
That is an easy change to make. Do you understand what the render variable is doing?

Just create the expression so that it evaluates to "true" only for the types where you want it to render.

Perhaps this is what you need:

ReportOutput () <> 'HTML'

I have to say it seems you aren't really investing a lot of your own energy on solving this. You should be reading up on topics that you aren't familiar with once someone gives you the general idea on how to approach a problem. You should also do some work on your own to try and figure it out. You seem to be expecting that people here will spoon feed things to you step by step.
Title: Re: Display Drop down VAlues
Post by: MFGF on 03 Jun 2013 10:37:46 AM
Hi,

Have you thought about adapting Lynn's suggestion a little?

How about creating a boolean variable with the expression: ReportOutput () <> 'HTML' and setting this as the render variable?

MF.
Title: Re: Display Drop down VAlues
Post by: MFGF on 03 Jun 2013 10:39:15 AM
Oh! Ha! Snap! Seems we're on the same wavelength, Lynn! Next you'll be telling me you're going to the Bahamas on vacation! :)
Title: Re: Display Drop down VAlues
Post by: Lynn on 03 Jun 2013 10:42:16 AM
Oooh! Bahamas sounds really nice!! I would do my very best to completely forget about render variables while there.
Title: Re: Display Drop down VAlues
Post by: MFGF on 03 Jun 2013 10:45:12 AM
It does? Great! I will drop by next Friday to pick you up :)
Title: Re: Display Drop down VAlues
Post by: Lynn on 03 Jun 2013 10:45:58 AM
sounds like a plan  8)
Title: Re: Display Drop down VAlues
Post by: MMcBride on 03 Jun 2013 04:06:07 PM
So you have a prompt "Drop Down" that shows up with a -1 on the report when it first loads (HTML) but then once you select this inline prompt you want to display the value select for other formats?

Using the ReportOutput () <> 'HTML' recommended by Lynn and MFGF will work for that

What I am trying to figure out is if you want to hide the Paramdisplay in HTML because a prompt value hasn't been selected yet so you want to hide it - or if you truely want to hide it in HTML...

If you really want to hide it for HTML then the ReportOutput thing is exactly what you want.
If however you are only hiding the HTML version try this instead

Expression Definition
if (ParamDisplayValue('variable') is missing) then ('All Whatever') else ParamDisplayValue('variable')

This will take a Prompt that is inline (On the same page as the data) and when you see the HTML or the ALL (which is the same as nothing being selected in the prompt) put Text so the user understands nothing has been selected yet.

Hope I haven't caused more confusion :)
Title: Re: Display Drop down VAlues
Post by: jaganlalrm on 04 Jun 2013 01:33:49 AM
Hi

           As MMcBride told i used yesterday itself. It works Correctly. 

         Thanks for you reply. Thanks for all to finished the task. Thank you very much

Jaganlal.R.M
Title: Re: Display Drop down VAlues
Post by: MFGF on 04 Jun 2013 07:52:53 AM
Glad you got it all working as you wish! Thanks for the update :)

MF.