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

ParamDisplayValue() plus concatenate a string, error

Started by jcrouch, 10 Nov 2011 03:40:09 PM

Previous topic - Next topic

jcrouch

Hi all,

I have a simple crosstab report and a prompt value that filters the data. I need one of the crosstab column headers to include the parameter value with a string " Price" after it. I unlocked the report and changed the 'source type' to 'Report Expression'. In the expression I put:

ParamDisplayValue('pVendor')

This works, but I need to add some text after the parameter value. I tried:

ParamDisplayValue('pVendor') || ' Price'

But this gives me an error. It seems any attemp to add text to this fails.

Is there a way to do this?

Thanks,

Jeremy

cognostechie

ParamDisplayValue is only for display, not for calculations. That's why it is available in Layout Calculation.

You can put a Text item after it and include 'Price' in that.

jcrouch

I did try using a separate text box to put the " Price" after it. But to get it formatted to look like a normal header I had to put them in a 2 column table, that kept them on the same horizontal line. But using the table, when exported to Excel it split the 2 into separate columns. Ill try again tomorrow to fix that.

So there is no way to cast the ParamDisplayValue, or otherwise convert it to useable text?

Thanks again,

Jeremy

HalfBloodPrince

Try This

ParamDisplayValue('Parameter_name')+' '+'Price'

jcrouch

Quote from: HalfBloodPrince on 10 Nov 2011 10:39:30 PM
Try This

ParamDisplayValue('Parameter_name')+' '+'Price'

;D Worked!

I thought I had tried the plus sign yesterday... Ill add this tip to my ever expanding Cognos Library.

Thanks

Jeremy