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

Displaying report, even with no data

Started by mohammed25, 23 Jan 2007 05:02:23 AM

Previous topic - Next topic

mohammed25

Hi Report Gurus,

I burst reports to 99 branches for my organization, and some branches does not hold data for a particular day but they would still like to see the actual report with blank columns as they use it for audit purposes.
Can u please help me out in displaying all branches even with no data the report has page breaks on branch and needs to show all the columns even if there is no data for the branch. I was able to acheive it through master-detail query but was still wondering if there is any other way.
plz help
any help is appreciated.

mavarga

I am not sure which version you use for reporting but in documentation for cogos 8 "cognos 8 report studio users guide"  is example on  page 124.
I have tried but i was not sucessfull to repeate example.


Marek

MDXpressor

There is a technique available in the Report Authoring Part 2 Public Course whereby they perform a count of rows for the report on the list and attach a rendering variable to it which will conditionally render either a) a list of data if the RowCount>0 or b) Text Item: "No Results" if the RowCount =0.  Do you need a sample?
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

mohammed25

Hi MDXpressor,

Thanks for the reply. It would be great if you could either guide me to the tutorials if they are on COGNOS website or post the sample example here.
Thanks again for your help.

COGNOiSe administrator

It would be great you you were to post an example based on GO Sales and Retailers package.

Gloves

You could use a Union in a Tabular Set.  This has helped me many times.  Make sure you have the same data items in both qrys.  You can use 0 in the items that have no data.

COGNOiSe administrator

How would a UNION help in this case? We are trying to display a text if there is no data returned from a query.

COGNOiSe administrator

BTW, none of the Cognos samples mentioned on the support site work, or they don't work with multi list reports.

MDXpressor

Apologies for the delay in providing this example.  Year-end pretty well sucked up all of my cycles for the past month or so.  I promise I will provide a sample in the near future...
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

COGNOiSe administrator

Don't worry about it. I should have one ready today or tomorrow. The trick was to use Conditional Blocks inside a list. Pretty cool if I say so myself. Let me generalize it with GOSAR.

Moody

Quote from: COGNOiSe administrator on 09 Apr 2007 06:47:44 PM
How would a UNION help in this case? We are trying to display a text if there is no data returned from a query.

I've done this before... I had to use a "generic" table that I created (with basically records that had a value of 0 for the column). I was then able to use this table to create my "empty" tabular model, which was then merged (through a set) with the "real" tabular model. Decent approach for a tabular model solution (vs. using Conditional Formatting)

COGNOiSe administrator

My approach was to use the base Tabular Model as  Tabular Reference for a "counting tabular model". Then based on the results of the counting query I was able to establish a conditional variable which in turn controlled a conditional display block.

Maple

Hey mohammed,

You can show blank col in your report by using Dimension Info option cognos 8.1...

step 1: Open the report in Report Studio
step 2: Navigate to the query that is feeding the crosstab via the Query Explorer
step 3: In the properties pane for the query, change the "Override dimension info" property to "Yes" from "No"
step 4: At the bottom of the screen, there will now be a "Dimension Info" tab
step 5: Add the items for the rows to one dimension by dragging them from the insertable objects pane to the dimension column.
step 5: Add the items for  the columns to the white space in the dimension column to create another dimension.
(e.g: Date,Location and Products)

2nd option : Union(as you know that you don't have data for some branches... so you have to fake it by using 0 in your query)
use union as Gloves said...create 2 quries having same data items
step 1: Query1> original query
step 2: Query2> copy of query1....use every thing same except measure...instead of using measure use 0
when  you union these 2 queries then it will give you the same result that you were getting before except it will show 0 values for those branches which are not holding any data...
and then you can format the coulmns >RMC (on the column) > Dataformat > select format type > "Zero value charachter"> you can use - or etc




COGNOiSe administrator

Good tip, but the post was about Cognos ReportNet, not Cognos 8.1.

Maple