COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: tinas on 25 Aug 2007 06:10:04 PM

Title: Report Studio 8. can you make a 0 appear for null records
Post by: tinas on 25 Aug 2007 06:10:04 PM
I have created a report for a client and after the report was reviewed, she indicated she needs to have a 0 appear for any nursing stations that have not have activity.  The report is a simple list and contains a column for Nursing Station and a column for patient count.  If there has been no activity for a particular nursing station for the date range selected on the report, the nursing station does not show at all.  She needs to have the nursing station show with a 0 in the patient count column.  I've tried creating a conditional statement for this along with several other things but nothing I've tried has worked.  I've also looked at the patient count in Framework Manager to see if there is a property setting I can change but nothing stands out.

Does anyone have suggestions on how this can be accomplished?

Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: snadgir30 on 26 Aug 2007 04:40:02 AM
Hi tinas,
If i am understanding your problem correctly-its like you want to show count of Patients for a particular Nursing station for a given selection of date range as zero but its not showing up in the report.

Either you need to set data format -as Missing Value to zero- in that  case for Patient Count field in report  or as modify expression of Patient Count field such that if count is missing/NULL then return zero.
or  As you said you can try using Conditional statement in Conditional formatting of report if Patient Count is NULL/Missing.

Hope it helps.
Let me know.

Regards
snadgir30
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: nosub on 05 Oct 2007 10:29:32 AM
I have found that using the custom data format method is more reliable...if that helps.
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: biejorrun on 08 Oct 2007 07:14:44 AM
...or you could try an ISNULL-command...
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: raja1718 on 13 Dec 2009 11:06:00 PM
Guys......I have some thing like score card.its has several boxes contains the count for diff queries.Finally i am calculating (adding) sum of all the counts of different boxes.But when one query results comes "Zero" its not displaying any thing its showing the blank.When the total of all the counts will also becoming zero.

when i used the missing value zero its displays zero in the individual box but not in the total count.its making all the values becoming zero.

Please any one help me to resolve this issue

Thanks in Advance

Raja[/b]
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: blom0344 on 15 Dec 2009 03:21:43 PM
Quote from: tinas on 25 Aug 2007 06:10:04 PM
I have created a report for a client and after the report was reviewed, she indicated she needs to have a 0 appear for any nursing stations that have not have activity.  The report is a simple list and contains a column for Nursing Station and a column for patient count.  If there has been no activity for a particular nursing station for the date range selected on the report, the nursing station does not show at all.  She needs to have the nursing station show with a 0 in the patient count column.  I've tried creating a conditional statement for this along with several other things but nothing I've tried has worked.  I've also looked at the patient count in Framework Manager to see if there is a property setting I can change but nothing stands out.

Does anyone have suggestions on how this can be accomplished?



You cannot format what is not there...

This is basically an inner / outer join issue. If you want all stations displayed regardless of activity then adjust you model accordingly thruogh and outer join.
If you cannot fix the model, then use 2 dataqueries (1 query fetching all stations) and stitch them in the report  to create a third one (use this for the report with appropriate formatting)
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: ajaju on 13 Jan 2010 04:07:27 AM
Please try using this simple coalesce function

Coalesce([data item],0) --- this function will return 0 if your Data item is null

Regards,
Aarti
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: blom0344 on 13 Jan 2010 06:55:53 AM
Quote from: ajaju on 13 Jan 2010 04:07:27 AM
Please try using this simple coalesce function

Coalesce([data item],0) --- this function will return 0 if your Data item is null

Regards,
Aarti

True, but only if the row is in the resultset. From the OP it looks like the model is based on inner join. This will exclude certain combinations (namely those with no activity). There is no solution then since the requested identity is not returned and the user is interested in identities with no activity
Title: Re: Report Studio 8. can you make a 0 appear for null records
Post by: Vishwas on 15 Jan 2010 04:04:19 AM
don't put those criterias which restricts your data completely. If you want to bring in those rows as well then have some dataitem and put condition there. I hope you understand ..

Instead of putting a filter like [result]= pass

put a dataitem like

case when [result]=pass then 1 else 0 end
this will give you zeros as well.