Footer Page Numbering (OpenInsight 64-bit)
At 19 APR 2022 03:34:28PM Jeff Miller wrote:
I am having problems with the page number when using the "FOOTER" Set_Printer message to control what is printed at the bottom of each page. All seems to be working well except for the starting page number.
I am running OI 9.4.
The reports start with page number 0. Then page 2. This is on all the reports.
How is the page number set. What can I do to make the report start with 1 instead of 0? (from page 2 and on the numbering works)
Note: I have tried to set @Page to 1 and it still starts with 0
Jeff Miller
Miller's Software Services
At 19 APR 2022 05:58PM Barry Stevens wrote:
I am having problems with the page number when using the "FOOTER" Set_Printer message to control what is printed at the bottom of each page. All seems to be working well except for the starting page number.
I am running OI 9.4.
The reports start with page number 0. Then page 2. This is on all the reports.
How is the page number set. What can I do to make the report start with 1 instead of 0? (from page 2 and on the numbering works)
Note: I have tried to set @Page to 1 and it still starts with 0
Jeff Miller
Miller's Software Services
Obviously something is wrong somewhere / out of sequence?
Try this after the INIT:
foo=Set_Printer("RESETPAGE")
At 19 APR 2022 08:33PM Jeff Miller wrote:
Thanks Barry for the suggestion.
I tried this statement just after the INIT statement and it made no difference. I put it in various other places just to see. No difference. And this problem is not on just one report. It is every report that I use the FOOTER set_printer command.
It is odd. I run the report to the viewer and it builds all the pages first then applies the footer. So it is in that procedure that it starts with 0. Then skips 1 and proceeds to 2 on the second page. (At least that works.)
Jeff Miller
Miller's Software Services
At 21 APR 2022 08:35AM bshumsky wrote:
Thanks Barry for the suggestion.
I tried this statement just after the INIT statement and it made no difference. I put it in various other places just to see. No difference. And this problem is not on just one report. It is every report that I use the FOOTER set_printer command.
It is odd. I run the report to the viewer and it builds all the pages first then applies the footer. So it is in that procedure that it starts with 0. Then skips 1 and proceeds to 2 on the second page. (At least that works.)
Jeff Miller
Miller's Software Services
Hi, Jeff. Are you seeing this behavior with OIPI.Net, OIPI "classic", or both?
If you're only seeing one or the other, you could try switching - that is, if you're only seeing this with OIPI.Net, and you don't need any of its special features, you might try OIPI classic and see if that works better. Similarly, if you're seeing this only in OIPI classic, you could try OIPI.Net and see if its output is acceptable.
To switch between them, there's a "configuration record" in the SYSENV table named CFG_OIPI. If field 1 says VSPRINTER1, then your output is generated via OIPI classic; if it says anything else (or doesn't exist), then the output is via OIPI.Net.
Two things to note:
1. These configuration records can be made application, user, or application AND user specific, so you can look for the most appropriate record - CFG_OIPI*<app>*<user>, CFG_OIPI**<user>, CFG_OIPI*<app>, or just CFG_OIPI;
2. The value of this configuration record is "cached", so you must exit OpenInsight and re-enter to see your changes
Hope that helps,
- Bryan Shumsky
At 21 APR 2022 09:17AM Jeff Miller wrote:
Thank you Bryan for the suggestion.
However, I kept looking for a solution. I was working on another report that did not have the problem. I found that the one that worked OK had a Set_Property( "HEADER" ) line as well as the FOOTER. Evidently I need both even if I don't need the Header. I pass a space in the header parameter. (I built a Header section using a different program logic.)
So to make the Page counter work properly, You need both the Header and Footer lines.
Jeff Miller
Miller's Software Services