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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help! zeros not showing up in report

Status
Not open for further replies.

cheerfulskeptic

Programmer
Feb 3, 2003
88
IN
I have 2 subreports -- one connects to a Pervasive SQL database and the other connects to an MS SQL 2000 database. I have running totals for both reports, except the Pervasive report has running totals that SUMS a quantity field, and the SQL 2000 report COUNTS the occurence.
My problem is that in the Pervasive SQL report, I want it to show zeros if there is a sum of zero, but all i get is blank spaces. If there is a value to be displayed, it displays correctly. The SQL reports shows the zeros just fine.
What could the problem be?
Thanks in advance!
 
There may not be a problem, it's just that you aren't getting any results in the pervasive database.

When you say that you want to show a dum of zero, there probably isn't anything to sum (no records selected), so you have nothing to sum.

Since I've no idea how you've laid out the subreports, or what's being displayed in them, it's hard to advise you well.

Instead of displaying the subreport, you might return a shared variable value from the subreport, with a reset formula setting it to 0 prior to executing the subreport, that way if the subreport gets no rows (hence the shared variable isn't updated), you already have it set to 0.

-k
 
If you right click the field and check the customized options, you might also want to check that the Suppress if Zero value isn't checked.

Naith
 
As Naith says, in Crystal 8.5 you can determine what value will be shown for zero. There is a [Show Zero Value As], in addition to [Suppress If Zero], and a formula suppress field for the entire field.

You can also set default values for various types of field, by choosing [Options] under [File] and selecting the [Fields] tab.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top