#24620 - 05/28/09 06:50 AM
layout expression
|
OL User
Registered: 01/30/08
Posts: 52
|
I have a problem with a 44 layout document, I want each record to print only the layout with the coresponding number using; IF(RECORD_NR()=LAYOUT_NR(), Print, Skip) But no pages are produced, where am I going wrong?
|
Top
|
|
|
|
#24621 - 05/28/09 08:19 AM
Re: layout expression
|
OL User
Registered: 01/30/08
Posts: 52
|
Ok, if I enter it manually (XX being the layout number)- IF(RECORD_NR()=XX , Print, Skip) It works, but this is a little tedious having to enter the number for each layout.
|
Top
|
|
|
|
#24623 - 05/28/09 09:45 AM
Re: layout expression
|
Anonymous
Unregistered
|
It is not designed that way. The layoutnumber shows the printed layout number, not the layout at designing. This to achieve a pagenumber in a multi-up situation.
Mostly when doing this kind of jobs, the layouts are similar. When that is the case you can setup the job differently by using the variable image expression like pagenr() to pick a certain page.
|
Top
|
|
|
|
#24624 - 05/28/09 09:56 AM
Re: layout expression
|
OL Expert
Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
|
Alfons,
I did a test, with two layouts. On the first layout, I have a text box with the static text "LAYOUT 1", and a variable on the next line that returns the value of LAYOUT_NR. I have a second layout with static text "LAYOUT 2", and a second variable that also returns LAYOUT_NR. Layout 1 has the condition "IF(RECORD_NR()=1, Print, Skip)", while layout 2 has "IF(RECORD_NR()=2, Print, Skip)".
When I preview this, I get two pages, as expected. The first page is layout 1, and the second page is layout 2. However, on both pages, LAYOUT_NR returns 1. The static changed, so I know it picked the right layouts, but it seems LAYOUT_NR returned 1 in both cases, and I don't think that's the intended behavior.
Regards, Rapha
|
Top
|
|
|
|
#24625 - 05/28/09 10:01 AM
Re: layout expression
|
Anonymous
Unregistered
|
What is the result at printing? When previewing this information is not available, otherwise a complete preflight has to be done prior the preview can be shown.
|
Top
|
|
|
|
#24627 - 05/29/09 01:54 AM
Re: layout expression
|
OL Expert
Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
|
The result of LAYOUT_NR in the design view is only a placeholder.
To see the actual result of LAYOUT_NR you will either need to print or open the print preview. The reason for this is that PSM needs to know which layouts are skipped and which layouts are printed before it can evaluate LAYOUT_NR. PSM does not have access to this information in the design view.
LAYOUT_NR does not return a constant index. It returns a counter that is incremented every time a layout is printed. Skipped layouts are not counted, and it resets after every record. Taking Raphael's test as an example:
Record 1: Layout 1 is printed. The LAYOUT_NR counter is incremented, its value is 1. Layout 2 is skipped.
Record 2: The LAYOUT_NR counter resets to 0. Layout 1 is skipped. Layout 2 is printed. The LAYOUT_NR counter is incremented, its value is 1.
The result of LAYOUT_NR will be 1 for both records.
Future versions of PSM will no longer allow you to use LAYOUT_NR in the scope of a layout condition. The LAYOUT_NR counter will only be valid after the current layout condition has been evaluated. If the current layout condition makes use of LAYOUT_NR, there's a circular reference.
|
Top
|
|
|
|
#24628 - 06/03/09 05:50 AM
Re: layout expression
|
OL User
Registered: 01/30/08
Posts: 52
|
Originally posted by Alfons: It is not designed that way. The layoutnumber shows the printed layout number, not the layout at designing. This to achieve a pagenumber in a multi-up situation.
Mostly when doing this kind of jobs, the layouts are similar. When that is the case you can setup the job differently by using the variable image expression like pagenr() to pick a certain page. This works. Thank you. I was using 'place PDF' when I shoud have used a variable image with a page expression.
|
Top
|
|
|
|
#24629 - 09/23/09 03:21 AM
Re: layout expression
|
Junior Member
Registered: 09/23/09
Posts: 1
|
Requires a duplex document to be printed on a printer using PrintShop Mail. The requirement is as follows:
1. At the corner of each document a non-variable text in addition to a running number of 7 digits is required. I tried to use the Page_NR() function to get the result. However, it gives me a single digit as the suffix.
2. On the other side of the document, the page should be covered with 1 inch x 1 inch square boxes with each box containing a four digit randomly generated number.
Could you please give your inputs on how this can be achieved?
|
Top
|
|
|
|
|
|