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
#21161 - 07/21/09 02:01 PM Check for condition on page 1 of data stream and apply to page 2
ASA-Ray Offline
Junior Member

Registered: 07/21/09
Posts: 2
I have a condition which checks for the word CHARGE anywhere on the page.When the condition is true the document prints 3 copies instead of 2. This works great for 1 page documents.

When the document flows to 2 pages, the word CHARGE does not appear on the second page. So the condition only reads true on page 1 and not on page 2. So I get 3 copies of page 1 and only 2 copies of page 2.

Any help would be greatly

Top
#21162 - 07/21/09 02:17 PM Re: Check for condition on page 1 of data stream and apply to page 2
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
ASA-Ray,

An idea would be to make a global variable of type boolean. Then, you make a new page that will not print, and will only execute on the first page. That page will be the first in your list of pages, and will simply contain a presstalk object with a code to look for the word CHARGE. If it finds it, it sets the global variable to True. Then you make your pages condition use the global variable as the condition. This way, if it's true on the first page, it will remain so for the rest of the document.

Regards,
Rapha

Top
#21163 - 07/21/09 04:00 PM Re: Check for condition on page 1 of data stream and apply to page 2
ASA-Ray Offline
Junior Member

Registered: 07/21/09
Posts: 2
Raphael,
Thanks for the response. Do you know if their is any way I can simply trap for the word CHARGE on the first page and if so trigger the third form page?

Meaning, on a two page invoice if the word charge is not present on the first page of data it will only print the two pages of data on form A and Form B. If the word CHARGE is present on page 1 of the data it will print the two pages of data onto FORM A, FORM B, and FORM C.

FORM A is a blank page with the overlay on it and the words customer copy on the bottom.
FORM B is a blank page with the overlay on it and the words store copy on the bottom
FORM C is a blank page with the overlay on it and the words mail to customer on the bottom

Top
#21164 - 07/22/09 09:49 AM Re: Check for condition on page 1 of data stream and apply to page 2
Anonymous
Unregistered


Hi ASA-Ray,

As Raphael mentioned, you will need a Global variable of type Boolean to achieve that. Let's call it: &bChargeFound. In the presstalk before your first page, create an if statement that will toggle or not your variable by looking for CHARGE on the 1st datapage only . Then, use that variable in the condition field of the Basic Attributes of the 3rd page.
Here is an example where CHARGE would be located anywhere on the 1st line.

Code:
 
(Presstalk before the 1st page)

&bChargeFound:=false
if((pos('CHARGE',uppercase(@(1,1,150)))>0) and (&current.datapage=1))
  &bChargeFound:=true
endif()

(Expression in the condition field of page 3)

=&bChargeFound

 
Please open a support call if you need further assistance. Thanks.

Regards,

Olivier

Top


Moderator:  cosimo, OL Newsgroup Support