COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: BIsrik on 02 Aug 2005 05:18:41 AM

Title: Display Default Data
Post by: BIsrik on 02 Aug 2005 05:18:41 AM
hi, i have report of this type. The report has two columns date and quantity. The report also has a date prompt.

The user enters a date range when he runs the reports. Lets assume date range is 1/8/2005 to 3/8/2005. Now suppose if there is no data available during this date range a default value zero has to come for quantity for all the three dates ie. 1/8/2005, 2/8/2005 and 3/8/2005.

What reportnet does is if there is data then it displays properly, but if no data then only the column heading comes up.

I tried with the missing value charecter in data format of quantity field but it didn't work. Please help me out.

srikanth
Title: Re: Display Default Data
Post by: cognosfreelancer on 02 Aug 2005 06:26:53 PM
Hi Srikanth

How about modifying the columns by adding a calculation on the lines below:

if null then zero

I have not tested this myself ...

HTH

NKT
Title: Re: Display Default Data
Post by: BIsrik on 03 Aug 2005 12:50:44 AM
Thanks for the reply.

But this works only when there is null values in the table. Then it will display zero. But if there is no data atall then even this condition doesn't work.

How to achieve this when there is no data.
Title: Re: Display Default Data
Post by: Darek on 04 Aug 2005 12:09:53 PM
You'd need a date table outer joined to your fact table.
Title: Re: Display Default Data
Post by: BIsrik on 05 Aug 2005 03:37:42 AM
I was doing the same. But here i am actually using tabular sets to join two independent queries(Tabular Model). Now how to left join the date table with the tabular set.
Title: Re: Display Default Data
Post by: Darek on 05 Aug 2005 08:21:18 AM
Using filters, perhaps? Something like:

TabularSet1.Field1 = TabularSet2.Field1 or TabularSet2.Field1 is null

Title: Re: Display Default Data
Post by: BIsrik on 23 Aug 2005 03:06:11 AM
sorry for the late response...the above filter didn't work
Title: Re: Display Default Data
Post by: phani1979 on 24 Aug 2005 04:11:39 AM
for that
why dont's u choose color options , display some color where there is no values
did ur try these
sudhakar
Title: Re: Display Default Data
Post by: BIsrik on 25 Aug 2005 04:52:18 AM
As of the report requirements goes zero has to be printed there. Choosing colour option also works when there is some data atleast a NULL value. Here in my case there is not even NULL values.

We made a workaround but it didn't work. We created a tabular sql which returns zero. Then used tabular set and union the report query and the tabular sql. this worked fine when there was no data. exactly what we needed. once there was some data added the default value zero also displayed along with data in the report. This was not needed.

If it was one or two reports then we could have gone with the above soln. But this case repeats for almost 80-90 reports. So we couldn't go with the workaround.