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

Package - Different Number of Rows For Different Items

Started by pucovsky, 16 Feb 2011 07:37:04 AM

Previous topic - Next topic

pucovsky

I have a package prepared and published in Framework Manager.
When I use this same package in Report Studio I get the required number of rows if I choose all Query Items from a Query Subject. I get more rows if I omit some of Items.

I thought that Subject in Package is similar to DB table, that the number of rows is determined by conditions specified.

Can someone explain me the difference and how package/subject functions?

What I understood is that package is defined by queries. So if I take a query subject from it and put one, all or just several of items into report, the number of rows should be the same...

Lynn

I think there are two important factors to consider:

1) Cognos will (by default) auto group and summarize so depending on what you select you'll get a "select distinct" or some type of aggregate with a group by clause.

2) Cognos will typically generate minimized SQL. If a query subject is built using elements from two tables that are joined in FM. If you select elements only in tableA then the join won't come into the picture. If drop out occurs because of a join you'd see fewer rows when selecting columns from both tables.


pucovsky

Quote from: Lynn on 16 Feb 2011 08:03:38 AM
I think there are two important factors to consider:

1) Cognos will (by default) auto group and summarize so depending on what you select you'll get a "select distinct" or some type of aggregate with a group by clause.

2) Cognos will typically generate minimized SQL. If a query subject is built using elements from two tables that are joined in FM. If you select elements only in tableA then the join won't come into the picture. If drop out occurs because of a join you'd see fewer rows when selecting columns from both tables.

Thanks. I think factor 2) is the case.
To create the query subject I joined several source tables.
I don't need to display items from one particular table but I need them to restrict the result set and get the correct data.
Can this be solved somehow?

Lynn

In a report studio report you can include an item in the query but not in the layout. Include the un-displayed item in the "Properties" property of the layout container (list or whatever).

Not exactly sure of your entire scenario so take this with a grain of salt or two...

pucovsky

Quote from: Lynn on 16 Feb 2011 08:21:45 AM
In a report studio report you can include an item in the query but not in the layout. Include the un-displayed item in the "Properties" property of the layout container (list or whatever).

Not exactly sure of your entire scenario so take this with a grain of salt or two...

Thanks. This worked!