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
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.
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
Try This
ParamDisplayValue('Parameter_name')+' '+'Price'
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