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

data item value in heading

Started by c84user, 29 Nov 2010 07:51:13 AM

Previous topic - Next topic

c84user

I am drilling thru from a Summary Report to a detail report passing both prompt parameter values and data item values.  In the second report I need to show all filtering values in the heading. 

I have no trouble getting the prompt parameter values to display in the heading but am having difficulty displaying the data item values that are passed.  I get the following error 'the variable named ....... is invalid'.

Is there a way to show these values in the heading?
Thanks for any suggestions.

Lynn

How are you trying to display it? You are passing the data item value to a parameter in the target report so ParamDisplayValue('YourParameterName') in a layout calculation should work.

c84user

Well, that was easy.  Thanks.  Just need to change my way of thinking I guess.  Here's another question.  Maybe it will be just as easy.

My summary report shows both vehicle counts and policy counts.  When drilling thru I want the detail report to display the counts that were selected and hide the other counts. 
In my summary report I have created 2 data items:
Policy with value of P
Vehicle with value of V
in the appropriate drill thru's I intend to pass the value of the appropriate data item.

Now in my detail report, how do I use that value to conditionally show or hide the appropriate columns?  I've only used passed values as filters before.

Lynn

Couldn't just quit while you were ahead 'eh?  :)

I tend to prefer render variables but conditional styles or conditional blocks would also work.

You will need to define a parameter in the target report so you can pass either the P or the V from your source. I would think one parameter that will receive either of those values is the way to go. You can drag in a prompt control in your target report and create the parameter that way. Or you can create a data item in the target query whose expression is, for example, ?PolicyOrVehicle? and create the parameter that way. If you use the data item approach you'd also need to associate that item to your report page since it wouldn't be in the layout (otherwise the page won't know about it).

If your target report is a list and one column has vehicle counts and another column has policy counts then you can define and apply the render variables (roughly) as follows:

- Click on the vehicle count column in the target report and use the ancestor button to get to the "List Column" properties.
- Click on the Render Variable property and create a new Boolean variable (e.g., named 'Show Vehicle Count')
- Create an expression that would be true when you want to show the vehicle count column (e.g., ParamDisplayValue('PolicyOrVehicle') = 'V'

If you get that going then just repeat for policy count making appropriate changes....then you can quit while you're ahead. Good luck!