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

previous or next record = 0

Status
Not open for further replies.

pomster

Technical User
Jan 15, 2003
88
AU
Hi there,
I have a table of printer meter readings that show monthly reads. GH1 is the printer serial no and detail contains the reads.

GH ABCD1234
D 35409 01/07/2010
D 36251 05/08/2010
D 0 21/09/2010
D 0 11/10/2010

What I am trying to do is show the pages printed in the 4 month period. Normally quite easy using max and min (difference).
This is until I come up against a zero value (read not supplied)If I use the previous record if the read is zero, I cannot summarize in the Group footer. This scenario could also throw a zero in the 1st detail line..

Any help appreciated

regards,


David

CRXIR2 with CRXIR2 server and SQL 2005
CR2008 with CR2008V1 Server and SQL 2005
 
I think you should remove the zero readings from the report in the selection formula:

{table.reading} <> 0

If you can't do that, you could use a formula like this:

if {table.reading} <> 0 then
{table.reading} else
tonumber({@null})

...where {@null} is a formula that you create by opening and closing a new formula without entering anything.

Then insert minimum/maximum on this formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top