IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#51232 - 03/26/15 03:54 PM Add a line of text at end of variable length doc
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
I have a document that prints using data from an AS400. It could be 1 page, 2 or 500. I want to add basically a statement message to the last page of the document. Is there an easy way to do this? There is a box that has
==================================================
=
= Our Company name etc....
= more info
=
==================================================

always at the bottom of the last page. I didn't know if I could look for a that box or something.... somehow... Any help would be appreciated

Top
#51239 - 03/27/15 08:43 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
jim3108 Offline
OL Expert

Registered: 04/19/10
Posts: 316
Loc: London, UK
Simply make a condition that checks if it is the last page.

In the condition of the object you want to show, put the following statement:
Code:
=&current.printpage = strtoint(GetMeta('SelectedCount[0]', 1, 'Job.Group.Document'))

Let me know how you get on.

Top
#51240 - 03/27/15 09:04 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
I will try that. How does that statement check if its the last page? I'm just trying to understand what it says and does. Thanks!!

Top
#51242 - 03/27/15 11:03 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
JFLAIR
Unregistered


tbradley,

There is a boolean system variable you can use, it is: &eojob, which means end of job. This variable is going to be True only when it reaches the end of the file.

You could then set an object with that in the condition, right click and go to System Variable, then Boolean click on eojob. Or write in the Condition field of the object's Basic Attributes
Code:
=&eojob


Hope this helps!
JF

Top
#51243 - 03/27/15 11:05 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
Tried that (the long string up above) but it seems that it is printing on every page still. I don't see how that code is telling it to only print on the last page. Any help would be great!



Edited by tbradley (03/27/15 11:07 AM)

Top
#51244 - 03/27/15 11:10 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
I just tried the =eojob. That worked...almost. My document that is 12 pages the verbage now prints on page 13...not at the end of the data on page 12. And on 4 page document it is printing on page 5. Also, It needs to float. I need it to be like 2 lines after that ========================= line.

Top
#51265 - 03/31/15 09:27 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
Anyone??

Top
#51268 - 03/31/15 11:20 AM Re: Add a line of text at end of variable length doc [Re: tbradley]
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
Okay. So I found out I don't need it to float. At the bottom of the last page is fine. So now is there anyway to use the EOJ but have it print on the last page...not the next page. So if it is 12 long, print at the bottom of page 12, not the bottom of page 13.

Top
#51271 - 03/31/15 12:26 PM Re: Add a line of text at end of variable length doc [Re: tbradley]
tbradley Offline
OL Guru

Registered: 05/03/11
Posts: 147
I figured it out! YAY!

Top