#30498 - 11/06/09 09:39 AM
Conditions on Multi Page Text Files
|
OL Newbie
Registered: 10/26/09
Posts: 17
Loc: Pennsylvania
|
Good Morning,
We are building our forms from simple .txt files that are passed from our Host System. Within the first line of the text file is a small line of text that indicates what type of form it is. Since we have several different variations of each form we have conditions setup to look at these. For instance, textstreamA may use one logo, but textstreamB may use another.
Our problem is this: The line that the condition is dependent on is only on the first line of the first page of what may be multi-page output. Once it flips to the second page, the line isn't there and therefore, we lose the logo (in this case).
What is the best way to handle multipage conditions?
Thanks for your help.
Dan
_________________________
Daniel Frederick II Database Developer/Analyst Four Seasons Produce, Inc Direct: 717-721-2869 Tel: 800-422-8384, Ext. 2869 Fax: 717-721-2523 Email: danf@fsproduce.com
|
Top
|
|
|
|
#30499 - 11/06/09 09:46 AM
Re: Conditions on Multi Page Text Files
|
OL Expert
Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
|
Dan_F, Have a presstalk object assign a value to a global variable on the first datapage. (give that presstalk object the condition: , so that it is run only on the first page) Then, you can put a condition on your picture based on that global variable, so if it's true on the first page, it will be true for the rest of the job. Regards, Rapha
|
Top
|
|
|
|
#30500 - 11/06/09 11:56 AM
Re: Conditions on Multi Page Text Files
|
OL Newbie
Registered: 10/26/09
Posts: 17
Loc: Pennsylvania
|
Raphael,
Thanks for the response. I've been reviewing documentation based on your instructions and being new to this, I'm still struggling. Can you provide more detailed steps?
Thanks again.
Dan
_________________________
Daniel Frederick II Database Developer/Analyst Four Seasons Produce, Inc Direct: 717-721-2869 Tel: 800-422-8384, Ext. 2869 Fax: 717-721-2523 Email: danf@fsproduce.com
|
Top
|
|
|
|
#30501 - 11/06/09 12:55 PM
Re: Conditions on Multi Page Text Files
|
OL Expert
Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
|
Dan, Here's some more detailed steps by step instructions: 1. Create a global variable. To do so, look in the Document Structure pane to the left, right-click on "Global variables" and select "Global variable". For the variable's type, you can choose "boolean", since it's going to be used as a condition on a logo. For this example, we'll name it "displaylogo". 2. Insert a PressTalk object on your page. Go in it's Basic Attributes, and for the condition, use: We only want this code to be run on the first page, so that's why we put this condition. In the actual code, clear what's already there, and use a code like this one: if(@(1,1,20) = 'Logo A')
&displaylogo := True
elseif()
&displaylogo := False
endif() Basically, this will look at some place in your data(in this case, on the first line, characters 1 to 20), and look for a specific string. If it finds it, it will set the variable to True, otherwise it will set it to False. You will need to change the "@" command to match the location of your data. 3. On your logo, go into the basic attributes, and put this condition: This will make it so the logo will be displayed if displaylogo is True. This should allow you to do what you want. Let us know how it goes! Regards, Rapha
|
Top
|
|
|
|
#30502 - 11/06/09 03:11 PM
Re: Conditions on Multi Page Text Files
|
OL Newbie
Registered: 10/26/09
Posts: 17
Loc: Pennsylvania
|
Raphael,
Thanks. That worked. One remaining question: It seems that I need the original condition (and Logo) for the first page, and the the process you described (tied to an additional Logo) for additional pages....is that what you would expect?
Thanks again for your help.
_________________________
Daniel Frederick II Database Developer/Analyst Four Seasons Produce, Inc Direct: 717-721-2869 Tel: 800-422-8384, Ext. 2869 Fax: 717-721-2523 Email: danf@fsproduce.com
|
Top
|
|
|
|
#30504 - 11/06/09 04:01 PM
Re: Conditions on Multi Page Text Files
|
OL Newbie
Registered: 10/26/09
Posts: 17
Loc: Pennsylvania
|
Well, when I set it up as you described, the logo now shows up on pages 2 and after. The first page has no logo. So I had to create the original condition, where the logo shows up on page 1, and then the process you described results in the other logo showing up on pages 2 and after.
The logo does appear to have the condition, but not for the first page.
_________________________
Daniel Frederick II Database Developer/Analyst Four Seasons Produce, Inc Direct: 717-721-2869 Tel: 800-422-8384, Ext. 2869 Fax: 717-721-2523 Email: danf@fsproduce.com
|
Top
|
|
|
|
#30506 - 11/06/09 05:05 PM
Re: Conditions on Multi Page Text Files
|
OL Newbie
Registered: 10/26/09
Posts: 17
Loc: Pennsylvania
|
Well, That did it! If I wasn't so new at this, I might be a little embarrassed.
Thanks for all your help.
Dan
_________________________
Daniel Frederick II Database Developer/Analyst Four Seasons Produce, Inc Direct: 717-721-2869 Tel: 800-422-8384, Ext. 2869 Fax: 717-721-2523 Email: danf@fsproduce.com
|
Top
|
|
|
|
|
|