[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
new page dilemma
- Subject: new page dilemma
- From: "Adem M. Hamidovic" <hamidoam@TUNS.CA>
- Date: Thu, 31 Oct 1996 13:33:18 -0400
For the report I'm creating I have a list of patients, dates, and daily
subtotals. When the dates change, a daily subtotal is printed off to the
side. So, for example:
Smith 01 08 96
Jones 01 08 96 10.95
White 04 08 96
Best 04 08 96 5.76
Wood 12 08 96
... and so on. I compute the daily subtotal by first printing the current
line without printing the subtotal, because I do not yet know if the date
will change. I then read the next record and compare that date with a
variable holding the previous date. If they differ I set position (-1)
and print the subtotal in the appropriate spot. This works fine in all
circumstances except one: if the date changes at the first position on
the next page (say page 2) the code states to go up one position and
print the subtotal. In this case, it goes up one position and prints in
the header, not on the last line of the previous page where it is
supposed to go. I thought about trying to set what the current page is,
but I don't know if that can be done. Does anyone have any suggestions?
-Adem