Pick_Tex wrote: > I have a program that does roughly this > > DONE=0; FIRST =1 > LOOP READNEXT ID ELSE DONE=1 UNTIL DONE DO > BR=FIELD(ID,'*',2) > BEGIN CASE > CASE FIRST > FIRST=0 > SP-ASSIGN ...... > PRINTER ON > HEADING ...... > LA.BR=BR > CASE LA.BR#BR > PRINTER OFF; PRINTER CLOSE > SP-ASSIGN ......... > PRINTER ON > HEADING ..... > LA.BR=BR > END CASE > ....... > REPEAT > > problem is that the program is confused about where it is on a page. > Instead of re-setting all its variables after closing the printer, it > thinKs that on the 2nd job that it it does not need to print a heading > at the top since it is still in the middle of the previous page. It > then page breaks at the wrong point, etc. > > Is there a simple known fix? :-) You mean, can I make it be broken in the same way my Ultimate system was? ;-)
The whole HEADING/PAGE thing was screwed up and illogical on all Picks, so rather than try to emulate every one of them exactly, we chose to do it completely predictably and logically. This might mean a tweak or two here and there but it should always be consistent... at least on 4.1 (which you should really use now), I can't remember if those changes were made in 3.x - if not then you need to experiment. The best thing to do is write a small test program that shows the effects of PRINTER ON/CLOSE/OFF and HEADING/PAGE. In the above code, I don't think you need the PRINTER OFF, just the PRINTER CLOSE, or maybe just the PRINTER OFF. Also, you have already assigned the PRINTER, so unless you are changing the assignment, don't do it again.Then, if you need to, after the HEADING, try a PAGE. However, it looks to me like this is 3.x and that it should really issue the form feed. Also, I advise adding some comments, camel casing the variables, using some whitespace and using variable names that might tell you something about the code. For instance, if whoever coded this originally had put a few lines of comments before CASE LA.BR#BR then you might know why they thought they need to reassign and so on :-( Jim --~--~---------~--~----~------------~-------~--~----~ Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en -~----------~----~----~----~------~----~------~--~---
