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

Record Count Used in Boolean Condition to drive a Conditional Block

Started by jv_oz, 27 Jul 2017 02:26:25 AM

Previous topic - Next topic

jv_oz

Hello,

I have a multi select Tree prompt that when used "in" a filter returns a number of records. None of the source data is a measure. I want to count the number of records and then use that count to determine whether to display a dynamic report title using a Description field (if the count is 1) or a static piece of text saying "Multiple Records Selected".

I have a query that returns the ID and Description, a constant number 1 and a sum of that column with the 1 in it. So if a single record is returned, the total is a "1". If three records are returned, the total says "3" etc.

I then have the Boolean condition defined to use that sum and if it is 1, then return "Yes" otherwise "No".

Then in a Conditional Block I have defined the use of the Description field for when the condition is "Yes" and the static text when it is "No".

My problem is that I get an error "If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005" blah blah. Normally I would just go to the report block (say the list or singleton), and add the "missing" columns into the Properties of the block. But in this case I am at a loss how to do that because the logic is in the Boolean condition, not the block itself. I have tried to add all the columns to the block, but no cigar!

Can anyone offer a pearl of wisdom how I could overcome this problem?

Thanks

JV

New_Guy

Hi,
Try creating a data item in the main query itself like count([DataItem that receives the prompt values]) and add it to the properties and use that in the conditional styles or use it in a singleton right beside the text.
New guy

jv_oz

Hi again, I should also note that the data source is a TM1 cube. Thanks

New_Guy

Hi,
Try count([measure] within set([prompt dataitem])) or create a seperate query with just the dataitem that receives the prompt values and then create a query reference and then use count.
Good luck
New guy