Print Page | Close Window

display a zero when no record exists?

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20378
Printed Date: 25 Apr 2024 at 11:54am


Topic: display a zero when no record exists?
Posted By: marco007
Subject: display a zero when no record exists?
Date Posted: 22 Jan 2014 at 3:45am
Hi folks

We are trying to control cost in various production departments so I'm trying to report on transactions recorded against various GL codes. I've written a report which lists all GL transactions in a certain fiscal period, I can then group it by GL code to get what I need.

The only problem I have is that if there was no transaction in a given period against a certain GL code then that GL code will be omitted from my report (naturally).

Is there any way that I can configure the report to list all of the GL codes that I'm interesteed in and if there is no transaction, then let it show a Zero?

Id appreciate any suggestions you might have.
thanks



Replies:
Posted By: lockwelle
Date Posted: 23 Jan 2014 at 6:07am
use the GL table as the 'base' table and join everything to it via Left outer joins...

This will display all GL codes, at least initially, you would have to filter out the unwanted GL...but at least this gets all the GL codes into the report.

HTH


Posted By: marco007
Date Posted: 11 Feb 2014 at 10:38pm
HI lockwelle
that worked alright, but not on my Crystal reports. I'm using CR11.5.3.417 and as far as I can see there seems to be some glitch which causing a problem when using a left outer join between the GL Account table and the GL Jrn Detail table.

I've been advised to patch up but I havent attempted this yet.

thanks for your reply


Posted By: SNelson
Date Posted: 28 Jun 2017 at 3:21am
Wondering if others have encountered this problem?
I'm running into this when reporting information by groups and in crosstabs. If there are no instances in a particular group it doesn't appear. I'd like the group (or a particular field value) to show with a '0' count.
I've tried creating a new numbervar w/ values of 0 & 1 with no luck. I've also wondered if I could use IsNull somehow.

Thanks!

-------------
SNelson



Print Page | Close Window