Jump to content

Rerun database


hoover

Recommended Posts

Can you rerun a database 3 times in ONE composition?

So

-first: record 1 until 200 (end record) 1 pdf is created.

-second: record 1 until 200 (end record) an other pdf is created.

-third: record 1 until 200 (end record) an other pdf is created.

 

thnks,

Hoover

Link to comment
Share on other sites

I'm trying to create 3 different files. Done in one run. But for each file the database has to be read each time. Its a very complex job.

I have one column with a value from 1 to 20.

I also have 3 pre-printen papers. if the value is 1 - 4 - 7 - 10 - 13 - 16 - 19

page 1 should be processed.

If the value is 2 - 5 - 8 - 11 - 14 - 17 - 20

page 2 should be processed.

If the value is 3- 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 -16 -17 -18 - 19 -

20

 

The pre-printen pages have the number

1 (for page1)

2 (for page2)

3 (for page2)

 

So if the value in the database is

7 i need the get 1x page 1 - and 2x page3

11 i need the get 1x page 2- and 3x page3

15 i need the get 5x page3

 

At this point the job is done by composing the FP doc 3 times and changing a global variable.

I want to save some working time for the operators so I would like to accomplish it in 1 run. Without any manual manipulation. Since FP 8 you can chunk the pdf output but I haven't figured a way to accomplish it in one run so far.

 

Any help is appreciated.

By the way FP is awesome. One of our best software investments over the past years.

 

Thnks Hoover

Link to comment
Share on other sites

I have one column with a value from 1 to 20.

I also have 3 pre-printed papers. if the value is 1 - 4 - 7 - 10 - 13 - 16 - 19

page 1 should be processed.

If the value is 2 - 5 - 8 - 11 - 14 - 17 - 20

page 2 should be processed.

If the value is 3- 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 -16 -17 -18 - 19 -

20

 

The pre-printed pages have the number

1 (for page1)

2 (for page2)

3 (for page2)

It looks like some information might have been lost in there, but determining which pages print per record could be achieved in the OnRecordStart callback rule:

if (Field("YOUR_FIELD")%3==1) {
  FusionPro.Composition.SetBodyPageUsage(1,true);
}
if (Field("YOUR_FIELD")%3==2) {
  FusionPro.Composition.SetBodyPageUsage(2,true);
}
if (Field("YOUR_FIELD")>2) {
  FusionPro.Composition.SetBodyPageUsage(3,true);
}

 

So if the value in the database is

7 i need the get 1x page 1 - and 2x page3

11 i need the get 1x page 2- and 3x page3

15 i need the get 5x page3

I understand how you are determining which of the three pages to include for each record, but I do not see how you are determining the quantity of each page. Assuming there is consistent logic that determines quantity for each value, you could just add a repeatRecordCount to the callback rule above.

 

I'm trying to create 3 different files. Done in one run.

What determines where one file ends and the next one begins? Potentially, you would link your data file as an external data file and use code in callback to process "three" records, outputting a unique file for each "record", but I don't understand what you intend to have in each file to suggest a solution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...