Fletch Posted March 2, 2016 Posted March 2, 2016 Attached you will see a PDF file that has 3 columns in it. There is also a data list attached that has multiple columns. What the customer is looking for is the Center ID number and Center name to be printed side by side underneath the “Study.Earn.Redeem” wording. Then they would like the ‘First Name’ and ‘Last Name’ underneath the ‘Student Name’ and the ‘Bonus Points’ under the ‘Bonus Points’. This will reoccur until a three columns are filled. (I was able to get 48 per column at 12pt font size, Helvetica Light Condensed) The interesting part is when the Center ID changes. The list is grouped alphabetically by Center ID number. When we reach a New Center ID, they want to stop printing on the current sheet and start a New sheet. In addition, they like to be able to print a slip sheet at the beginning of each new Center (there are 312 of them) that will contain the Center name and ID number, as well as a 3 of 9 barcode that contains the Center ID number. Quote
Fletch Posted March 2, 2016 Author Posted March 2, 2016 Sorry. Can this be done with FusionPro? How? Quote
step Posted March 2, 2016 Posted March 2, 2016 Yes, it can be done with FusionPro. In the example that you posted, you have 260 records in your data. However, since you technically only want to create 2 records from that data (one record for 10062 and one record for 10280), you're going to need your data in a format that better lends itself to the output you're trying to create. You could edit the data and assign fields that correspond to each column per record or you could link to your data as an external data file and let JavaScript handle it for you. The latter method will walk through each record of your input data file at the start of the job (in OnJobStart) and determine how many unique CenterID's there are in the data and set the number of records to compose to be equal to the number of unique CenterIDs: var recs = 0; var id = ''; var ex = new ExternalDataFileEx(FusionPro.Composition.inputFileName,'\t'); for (var i=1; i<=ex.recordCount; i++) { if (ex.GetFieldValue(i, 'CenterID') != id) { id = ex.GetFieldValue(i, 'CenterID'); recs++; } } FusionPro.Composition.composeAllRecords = false; FusionPro.Composition.endRecordNumber = recs; Of course you'll also need a way to access that data when you're composing the job. My recommendation for that would be to create a global object or array to hold those values. You can insert the values by tweaking the OnJobStart rule above (and there are plenty of examples on the forum – one of which I posted yesterday). From there it's just a matter of referencing the global object or array for each record rather than the actual fields in FusionPro. As far as the slipsheet goes, since each record will ultimately end up being a new "center," you can probably just create a "slipsheet" body page in addition to the current body page. That will make each "center" start with a slipsheet. I'm not sure what you intend to happen if the number of names and points exceeds what is able to fit on 1 sheet but my suggestion would be to duplicate your body page and use it an overflow page. Anyway, that's how I would do it but hopefully that helps point you in the right direction. Quote
Fletch Posted March 2, 2016 Author Posted March 2, 2016 Sounds good. FYI, the data I attached was only a sample. There are actually 38,000+ records, with 312 different customer ID's. I'm guessing all that you wrote will still apply. Quote
Recommended Posts
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.