Meir Posted February 29, 2012 Share Posted February 29, 2012 I am trying to create a versioned product. It will have a cover sheet and then have the inside page repeat the number of times the user selects in the drop down of field("NumberOfPages"). Is it possible to have 1 copy of page 1 and N copies of page 2 output into one record? I have tried numerous repeatRecordCount rules to no avail. Thank you, Meir I am using FusionPro 7.2 Mac OS X 10.5.8 Link to comment Share on other sites More sharing options...
Dan Korn Posted February 29, 2012 Share Posted February 29, 2012 Just repeat the entire record the specified number of times, but suppress page one for all repeats except the first. Link to comment Share on other sites More sharing options...
esmith Posted February 29, 2012 Share Posted February 29, 2012 Would that be accomplished by doing the following? OnRecordStart: FusionPro.Composition.repeatRecordCount = Field("NumberOfPages"); if (FusionPro.Composition.repeatRecordNumber == "1") { FusionPro.Composition.SetBodyPageUsage("NameOfCover",true); } FusionPro.Composition.SetBodyPageUsage("NameOfInsidePage",true); Link to comment Share on other sites More sharing options...
Meir Posted March 1, 2012 Author Share Posted March 1, 2012 I had tried the following but it would only produce 2 pages no matter the input. //Set active the second page to be repeated FusionPro.Composition.SetBodyPageUsage("Cover", false); FusionPro.Composition.SetBodyPageUsage("InsidePages", true); // //Call fusion pro to repeat the page NumberofPages times FusionPro.Composition.repeatRecordCount = Field("NumberofPages"); // //Activate Cover once FusionPro.Composition.SetBodyPageUsage("Cover", true); I also tried Esmiths recommendation which also only produced two pages in the press proof. I then tried this reworked version of code posted in another thread, which also did not not work. var repeatable = Int(Field("NumberofPages")); // FusionPro.Composition.repeatRecordCount = repeatable; // var thisRepeat = FusionPro.Composition.repeatRecordNumber; // switch (thisRepeat) { case 1: FusionPro.Composition.SetBodyPageUsage("Cover", true); break; // default: FusionPro.Composition.SetBodyPageUsage("CoverSheet", false); } { Print(thisRepeat + ": InsidePages"); FusionPro.Composition.SetBodyPageUsage("InsidePages", true); } Any advice? Link to comment Share on other sites More sharing options...
esmith Posted March 1, 2012 Share Posted March 1, 2012 Dumb question, but (at least in the case of my rule offering) are you remembering to set your two template pages to be "unused" in the Manage Pages dialog and giving them matching names with the names used in the OnRecordStart rule? Link to comment Share on other sites More sharing options...
Meir Posted March 1, 2012 Author Share Posted March 1, 2012 I had set their names in the Manage Pages section to match what they are called in my OnRecordStart rule, but I did not realize I had to set them to unused. I tried setting them to unused and trying your rule again but it still only outputs two pages no matter my input. I am basing this output on both the composition, as well as the manager preview press proof. Could it be possible that the press proof only generates one record and to view all the pages I would have to fully order the product? (I doubt this is the case but there is always the possibility.) I tried using my two previously mentioned rules again but with the pages set to unused in the Manage Pages section, but they both continued to output 2 pages. Any help would be appreciated. Link to comment Share on other sites More sharing options...
Dan Korn Posted March 1, 2012 Share Posted March 1, 2012 All you need to do is this in OnRecordStart: FusionPro.Composition.repeatRecordCount = Field("NumberOfPages"); FusionPro.Composition.SetBodyPageUsage("Cover", FusionPro.Composition.repeatRecordNumber == 1); Obviously the field name has to match your data, and the page name has to match the name you give it in the Page Usage dialog. (You don't need to name the second page; that's always output. You shouldn't mark either page as Unused either.) Get it working in FP Desktop first, then try it in MarcomCentral. Link to comment Share on other sites More sharing options...
Meir Posted March 1, 2012 Author Share Posted March 1, 2012 When I input that code, I still get two pages as output. My data file calls for 25 pages. Attached is my attempt with Dan's code. I tried again after I zipped it forcing it to input the input field as an integer, but that did not work either (shown below). FusionPro.Composition.repeatRecordCount = Int(Field("NumberofPages")); FusionPro.Composition.SetBodyPageUsage("Cover", FusionPro.Composition.repeatRecordNumber == 1); P.S. Whenever I post to this forum, it cuts my post off just before the end code tag is. I then have to come back in and edit my post to put anything after the code tag and to complete the tags to actually display my code as code. Does anyone else experience this?CollectDANway.zip Link to comment Share on other sites More sharing options...
esmith Posted March 1, 2012 Share Posted March 1, 2012 P.S. Whenever I post to this forum, it cuts my post off just before the end code tag is. I then have to come back in and edit my post to put anything after the code tag and to complete the tags to actually display my code as code. Does anyone else experience this? Yes, me. It usually happens when I am trying to respond with a "Quick Reply" which is why if I am including code in my response, I usually go the more "formal" response window and I always copy my response before previewing in case this issue happens so that I don't have to retype my answer! Link to comment Share on other sites More sharing options...
Dan Korn Posted March 1, 2012 Share Posted March 1, 2012 When I input that code, I still get two pages as output. My data file calls for 25 pages. Attached is my attempt with Dan's code. I tried again after I zipped it forcing it to input the input field as an integer, but that did not work either (shown below). FusionPro.Composition.repeatRecordCount = Int(Field("NumberofPages")); FusionPro.Composition.SetBodyPageUsage("Cover", FusionPro.Composition.repeatRecordNumber == 1); I composed your job and got 26 pages of output, as expected Of course, the data file you included doesn't have any actual data for the "Cover" and "Inside Pages" fields which drive the graphic frames, so all the pages were blank in the output, which makes it hard to tell which page is which. I added some other content to the pages so you can tell what's going on, in the attached template file. It's working fine as far as I can tell. P.S. Whenever I post to this forum, it cuts my post off just before the end code tag is. I then have to come back in and edit my post to put anything after the code tag and to complete the tags to actually display my code as code. Does anyone else experience this? Yes, as Eric notes, the "Go Advanced" and "Preview Post" buttons are your friends.Pads_Cust.pdf Link to comment Share on other sites More sharing options...
Meir Posted March 1, 2012 Author Share Posted March 1, 2012 Strange... I tried composing mine again and still got a 2 page output. I then placed the pdf you uploaded with the additional identifiers in a folder with the data file and composed that. It also resulted in a 2 page output. I then tried my same template on a different mac in the office and it composed 26 pages as it is supposed to. I recomposed, recollected, and uploaded it to printable on that mac, and it will not work in the back end preview. So I'll take it I need to reformat my Mac. That appears to be an issue with my particular computer. I tried renaming my files, recollecting and reuploading, but that did not work either. I then recreated the file, composed, collected, and reuploaded. Now it works fine. Thanks for all your help guys! I really appreciate it! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.