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

Techniques for passing "sets" of parameters?

Started by hespora, 21 Sep 2016 03:47:54 AM

Previous topic - Next topic

hespora

Hi there,


so I want to burst a report by ([Customer] AND [Business Unit]). Both Customer and Business Unit are available as fields, but I only want to run the report for specific sets. E.g., I want to run the report for (Customer 123 AND Business Unit ABC), and I want to run it for (Customer 456 AND Business Unit DEF).

If I just pass 123, 456 in a customer parameter and ABC, DEF in a Business unit parameter, the report would also run for (123 + DEF), and for (456 + ABC), however, I do not want those.

Anyone have any experience with passing sets of parameters to be run only in conjunction?


Thanks,
hespora.

bdbits

I must be missing something... sounds like a simple AND of the two parameters in a filter.

hespora

If I were to setup a filter like


[customer] in ?pCustomer? AND [BU] in ?pBU?


how would I control Cognos to only use those sets of parameters belonging together?

Michael75

Something like this?

([customer] in ?pCustomer? AND [BU] in ?pBU?)
AND
(
([customer] = 123 AND [BU] = 'ABC')
OR
([customer] = 456 AND [BU] = 'DEF')
)

hespora

Well, the thing is, I cannot hardcode values - hence the need for parameters. I'm right now looking into building a field


[Customer] || ';' || [BU]

within the query and setting the parameter on that. Question, performance-wise, really is whether the SQL passes that to be done on database level, or if it's done within the query service.

I was just hoping that someone might have a different approach for the same problem.

bdbits

OK I think I did not follow you fully in the original post. Right now I am thinking perhaps you mean to restrict the user to specific combinations.

Michael75's approach might work there.

Or (thinking off the top of my head here), perhaps you could set up a prompt populated by a concatenation of the valid combinations?
So the user would pick from 'Customer A and 123', 'Customer B and 456', etc.
Then in the report, create the same concatenated data item and apply a filter to that.