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

Filter Report Based on Current Menu Location

Started by Iggy, 24 Jul 2011 02:50:32 PM

Previous topic - Next topic

Iggy

Hello COGNOS community,

Please can someone tell me where I might be going wrong here.

I am trying to filter my report based on it's location within the Cognos Connection Menu Structure.  I want to have multiple views of the report that are filtered based on their location within the menu structure.

My report source is TM1 and I am creating a crosstab query.

I have copied both the (Hierarchy Set) and (Members) from the dimension I want to filter into my data source.   (Am I going wrong at this point?)

I can create a [Data Item] that will select a member to filter based on an if condition:

if (1=1) then
([Dept1])
ELSE
([Dept2])

This works to select [Dept1] (and [Dept2] if I change the condition to 1=2)

HOWEVER,  when I change the IF condition to:

IF (position ('Dept1',Reportpath() )>0) THEN
    ([Dept1])
ELSE
([Dept2])

Then I get the error:
An error occurred while performing operation 'sqlPrepareWithOptions' status='-126'.

I can't see how the expression (position ('Dept1',Reportpath() )>0) is causing this problem?  Something to do with NULL??

Any assistance would be greatly appreciated

Regards,

Iggy

Iggy

I have found that trying to filter reports based on their location within Cognos Connection is not the method Cognos expects.

Rather,  The report should be created with parameters to filter the data, and then;

Multiple 'Report Views' can then be created and located where they are needed in the menu structure.
These report views can have their properties edited,  Under "Report View" the parameter settings for the view in this menu location can be specifically set.

, Iggy.