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

Pass parameter value(s) to query item

Started by globalbear, 27 Nov 2009 05:20:42 AM

Previous topic - Next topic

globalbear

I want to display a parameter value as a query item in a report. Is there a way of doing this?

I have a report that gives me sales for different companies. I put a multi-select value prompt on a prompt page that uses my companies query.

My companies query gives me two items: company_name and company_number.

My prompt ?company? uses the company_number and displays the company_name and my final query filters on company_number in (?company?).

When running the report I choose one or more companies from the value prompt and then the final report is filtered by these companies.

So far so good - now in the header of the report I want to display which company filter that is applied. I want the text to be something like:
"This report is filtered by company A, B, C".

That cannot be done by using the company_name query item since I would get one row for each company, something like:
"This report is filtered by company
A
B
C
"
Doesn't look good - does it?

One way of doing this would be to put a layuot calculation on the page that uses ParamDisplayValue('company') - that works. But I do not wish to use that solution since I want to be able to send prompts from one report to another. If I use drill-thrus the ParamDisplayValues don't pass from source to target report the correct way.

The solution I would like to use is to put a query item in my report that gives me the value(s) from my
?company? parameter. I would like my query item to be populated with "A, B, C". In that way I could use that query item on the report header. Problem is I cannot make it work, I tried a new query item with ?company? as expression but it didn't behave the way I expected.

Is there a way to populate a query item with the values from a parameter or any other ways of taking the different values (rows) from one query item and concatenate them into another query item as one value?

We are on version 8.2

CognosPaul

Try using a repeater. Place the data inside it, followed by a text item containing ', '. The hard part would be preventing that comma from rendering for the last repeater.