Hi Folks,
I have a query..
I want to show the selected prompt values in the report and the query item selected is from a hierarchy. I used Param value.
Paramvalue('P_Segment')
The output is
Segments: [NS_LaborAnalysis_Dimens].[RD_Segments].[Segment].[Segment]->[all].[BASE]
which displays the whole hierarchy path. But i just require the value BASE which is the param value..
Kindly help me resolve this.
Thanks
Have you tried using ParamDisplayValue instead?
MF.
Yes, I have tried both paramvalue and paramdisplayvalue..
Nothing works :(
Try
substring(Paramvalue('P_Segment')
,69
,character_length(Paramvalue('P_Segment'))-69)
The 69 is the number of characters in '[NS_LaborAnalysis_Dimens].[RD_Segments].[Segment].[Segment]->[all].['
You say that "nothing works."
Do you mean that the report itself fails? Or does the report run correctly but you can't display the param value?
Have you checked the param value for null to see if the report receives it correctly?
To display the value of the Parameter, use a Layout calculation instead of a Query calculation
Hi,
The rreport runs fine.. but the paramvalue stuff gets displayed with the whole hierarchy path.
For Eg: The hierarchy query item segment has values like BASE, BASE OUTSOURCE. But what I get is
Segments: [NS_LaborAnalysis_Dimens].[RD_Segments].[Segment].[Segment]->[all].[BASE]
Let me try with your option and see what happens..
Many thanks..
Hi Paul,
substring(Paramvalue('P_Segment')
,69
,character_length(Paramvalue('P_Segment'))-69)
This works only for single value selection and does'nt work for multiple value selection right?
I have used Layout calculation FYI..
Still I face the same issue :(
Any ideas?
Many thanks..
Hm. What is your data source? Just tried it with a powercube...
ParamValue give the MUN like "[Krankenhaus Cube].[Dim Krankenhaus].[Dim Krankenhaus].[Krankenhaus Land]->:[PC].[@MEMBER].[Baden-Württemberg]"
ParamDisplayValue gives the displayed value like "Baden-Württemberg"
So this works. Maybe you can play around with a new field based on the Caption() command.
Hi,
The datasource is a FM Package which connects to Oracle..
Can you brief me once again.. I mean about the Caption() command..
I also used Paramdisplayvalue(). but not getting the end value rather getting whole path.
many thanks..
QuoteError description
When a report which contains prompts (ie tree prompts) which
have default selections, ParamDisplayValue will display the
MUN, rather than the actual value.
( ie member caption)
Local fix
Problem summary
****************************************************************
* USERS AFFECTED: *
* All Users *
****************************************************************
* PROBLEM DESCRIPTION: *
* See error description. *
****************************************************************
* RECOMMENDATION: *
* Upgrade to IBM Cognos 8 Business Intelligence 8.4.1 FP2 *
****************************************************************
This is what mother IBM says to your problem ;)
For a workaround... you could add (if not added yet) the corresponding field to your query and use this in a small extra list on your report to reflect the selected prompt value. If this is always only ONE item (as your prompt accepts only single parameter) you can do this within a singleton.
If using this field also throws out a MUN, you can here do a caption([fieldname]) in your query which does the thing you want. I hope.
I would need both single selection as well as for mutiple selection. Will caption command works for multiple selection? still cud'nt resolve it..
thanks...
Using singleton query item its working fine.. but is there a way to make it work for multiple selections as well?
many thanks..
As i know -> for multiple selection a Singleton is not the right choice. I would solve this - as described - with a small list.
I'm sure there are other, smoother solutions. Come on folks! ;)
Well, instead of a list I'd use a repeater. That would let the values go across the screen, instead of down and taking up lots of room.
So basically you'd have a query that is essentially:
set(#promptmany('P_Segment','memberuniquename')#)
You'd stick that data item into the repeater. Before the data item you'd put a text item with ', ', with a render variable RowNumber()<>1.
That way you could get seg1, seg2, seg3, seg4, etc.
Quote from: PaulM on 07 Oct 2010 04:21:57 AM
You'd stick that data item into the repeater. Before the data item you'd put a text item with ', ', with a render variable RowNumber()<>1.
That way you could get seg1, seg2, seg3, seg4, etc.
*thumbsup*