Svetlana
4th March 2003, 10:55
Hello,
How to display number of sheets in the report?
Example,
Sheet 2 of 26.
How to find number of sheets (26)?
Thanks.

Paul P
4th March 2003, 11:04
Dear Svetlana,

Pls refer to:
Printing total number of pages on a report (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=956)
Page x of y: Jo Büche's solution (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=6190)
Page x of y: Kevin Brock's solution (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1079)

Rgds,
Paul

Svetlana
4th March 2003, 12:27
thanks

b.v.dj
4th March 2003, 16:38
Hi,

This is a script that can do the job. It 's a raw version. I couldn't let the challenge of making a script pass by.

See attachment for script and device settings.

mark_h
4th March 2003, 17:18
Not a bad idea - I used awk or sed at one point like you did. What I did was put in the header page xxx of yyy - where xxx was the baan page number and yyy was to be replaced using sed. The only problem was with sending the report to the printer afterwards - never seemed to be able to get it right. Would you happen to have a solution for printing after this conversion? Anyway this solution did work pretty good if you were doing something like a PDF file and not printing the report. And of course this was only a solution for systems running a UNIX type environment.

Of course if you fine tune this to a complete solution we could include it in the code and utilities forum as another possible solution for the ever so popular page x of y problem. :)


Mark

b.v.dj
4th March 2003, 17:40
In my opinion the script should do all, so you don't have to modify all Baan reports.

Sending the report to the printer is done by the line:
/usr/bin/lp -c -d$2 -n$3 -s /tmp/xofy.rep2

This is possible, because I 'sed' on the output file with printer controlcharacters in it.

I know it doesn't work on MS. Yet another reason to use Unix.

I hope someone picks up this code for enhancement. I don't have the time to go further with this.