Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grand Total

Status
Not open for further replies.

vespin

Technical User
Sep 17, 2001
17
US
Occasionally I will run a sql statement that will search for certain words in a report, then count how many entries there are..i.e If I wanted to run a report of how many users in our db had last names that started with A and have a numeric total at the end. When I use the grand total feature and there are no entries equaling the sql string that I've written, i.e there are no users whose last names start with A... the grand total field comes up blank. As opposed to leaving the field blank I want CR to show the value as 0. How would I do this...

Also when using crystal reports is there a way to exclude null entries? I am aware that I can run a like %, but if there's any easier way it would be great to know. Thanks for reading this. If it doesn’t make sense, I’m a novice, what can I say :)


 
Not (IsNull({your field})) will is a generic formula for selecting records that are not null.
Regarding your other question, how is your report structured? If you are using a Grand Total to get your result, and there are no records that meet your criteria, then your report would have no records returned to it by the SQL. Is that the situation, or are you using the term grand total in a broader sense.
 
I am using it pretty much in a ticketing system. We keep tabs on the type of system that the customer is using....so lets say I'm going to search for the number of people who are on a network...I just write a sql statement to look for this, then use the grandtotal as a counter to tell how many people are on a network, then the development team will develop the product more for network users...the problem is that if there are no network users, the total pulls blank, as it should. I want it to fill the black field with 0 automatically. Is there a way to do that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top