COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gosoccer on 23 Oct 2012 10:53:06 AM

Title: Prompt -> Query Subject -> and Data Display
Post by: gosoccer on 23 Oct 2012 10:53:06 AM
Friends,
This is a none-Cube, Package created from Framework Manager issue.

I have a situation that the Prompt of many organization_id (A,B,C) needs to be available to the customer;however, some records based on certain flag, DO NOT HAVE the organization_id in our database. Like we need to show the parent's info belonging to an organization_id A but their children may or may not be associated to an organization and we still need to list them under the parents.

I can run the Query Subject in Framework Manager and it shows me all records since there is no Organization_Id selection but as a part of the Report Author, the orgnization_id selection is filtering OUT all children records with NULL in organization_id.

I need to specific a filteration within Report Author that doesn't exclude the records if the Organization_id is NULL and just use the Parent's organization_id to display the data.

Thx in advance for your time.
Please help!!
Title: Re: Prompt -> Query Subject -> and Data Display
Post by: blom0344 on 23 Oct 2012 01:28:50 PM
I have no idea how your model looks like and your post is a little confusing, but you need to either add 'or orgnization_id is null' to your filter definition or change the join type (you pick which is relevant in your case)
Title: Re: Prompt -> Query Subject -> and Data Display
Post by: gosoccer on 23 Oct 2012 02:46:29 PM
Thx so much! I'll try this. The Model actually works great when I use the Test but that is because there is no Organization_ID parameter unlike the Report Author file. I'll try your suggestions in the Query's Filter.

The filter on the Query looks like this so I know it's going to give me hard time.
Quotecase when #sq($account.parameters.STO)#  = xxxx then
([BUSINESS_VIEW].[XX_QUERY].[ORG_ID] in (?Parameter1?))
Title: Re: Prompt -> Query Subject -> and Data Display
Post by: gosoccer on 23 Oct 2012 03:06:43 PM
Yes, it works
:)
Quote([BUSINESS_VIEW].[XXX_QUERY].[ORG_ID] in (?OrgParam?) OR [BUSINESS_VIEW].[xxx_QUERY].[ORG_ID] is null)
Title: Re: Prompt -> Query Subject -> and Data Display
Post by: gosoccer on 25 Oct 2012 01:51:08 PM
But unfortunately, the NULL based ORG_ID is getting pickup by the SECTION based on ORG_ID.
SO for example, instead of the following listing based on SECTION by ORG_ID

CORRECT WAY IS SHOULD LOOK.

ORG_ID : AA
Parent               Child               ORG_ID
2121221                                   AA
2121221           323232             NULL

BUT IT IS SHOWING AS FOLLOWING,

ORG_ID : AA
Parent               Child               ORG_ID
2121221                                   AA

ORG_ID : NULL
2121221           323232             NULL

It's putting the Child under the NULL ORG_ID while it needs to be under AA.

There has to be an easy way to tell it to keep the parent and child together but still do the
ORG_ID based SECTION?
Thx so much again!!