I have a job that prints simple 8-line labels, 12-up (2 side-by-side columns) on a Letter size sheet.
The one requirement that’s throwing me through a loop (pun intended) is that when the first row of label data contains a character with a value change, which indicates the start of a new sheet.
I can create a Data Map that looks at this character and creates a new record on value change, and then load all the labels, 8 lines at a time, into a Detail Table.
I’m lost on how to create the Template. I don’t think n-up works against Detail Tables, and Detail Tables don’t have the option of running down, then back up, a page before paginating.
Just to get the gist of it, you could end-up with a sheet with 12 labels then the next could have only 9 because of the (value change character) then 12 then 12 then 6 then 12, etc…?
Yes. In simplistic terms, I would write a preprocessor to break the data into multiple files, one new file each time the “new sheet” value changes. Then run it as a series of very simple n-up jobs.
But I want to understand how I’d do this without breaking up the data file.
So there could be 10 8-line labels which would run 6 down the left side of the page, 4 down the right and the 11th label would have the “new sheet” value, so start a brand new sheet, imposing 2x6 until a record with a “new sheet” value is encountered.
Perhaps Detail tables is the wrong approach.
I could set the Data Map to create a new record every 8 lines, and design the job as n-up no issue, if only there was a way to force a new sheet on the value of a field. Is that possible?
Currently looking into it…will keep you posted
Unfortunately, such option is yet to be created (will request it to our R&D ).
What you could do would be to set-up your Datamapping to 1 record for each (new sheet). Each record has a detail table with X amount of label.
You then setup your Template so all 12 labels are already on the sheet (no imposition in the OutputPreset).
Using Scripts, you fill each label with a pre-defined detail table record. So if there is only 8, then second column has only the first 2 filled-up.
When you have more than 12, you can use a Control Script to clone the Section while settings indexes so 1st column 1st row is set to 1 or 13 or 25 or, etc…
Does that helps?
It kind of use the same logic as in version 7…kinda!
Yeah, I get it. Cumbersome, but also solves the problem that this isn’t really “cut and stack”. All potential blanks would appear on the last sheet, ideally. Cut and stack would place the blanks, for example, in the bottom corner of several sheets, which really isn’t the desired result.
Thank you.
Thomas
How you describe the Data Map is how I initially built it, but I get an out-of-bounds error on the last detail record of the last page. I think this is due to the persistent bug with Connect treating CRLF at the end of the file as the start of a new record. I have the “ignore CR/LF at end of file” option checked, but think something about having a detail table causes the issue to reappear.
To help you properly we would need to see the data and Datamapper and reproduce the issue. I suggest you open a technical support call at 1-866-348-5863 or through our website.
Submitted. Meanwhile, I’d love some assistance with the Control Script. Right now I have the Control Script initiating a variable called “labelCounter” to 0.
I have 14 Text Scripts (I can fit 7 pairs of labels in my test template).
@label_01@ =
var result = "";
result = record.tables.detail[labelCounter].fields.Label_Data;
results.html(result);
@label_02@ =
var result = "";
result = record.tables.detail[labelCounter+1].fields.Label_Data;
results.html(result);
And so on. For now I have a simple table with the cells filled with all 14 text scripts.
Conceptually, I understand that I should loop through, cloning the section, incrementing my labelCounter variable (in this case) by 14 until I run out of data records. But I’m struggling to get the cloning working correctly, and then I suppose if the number of records won’t fill a sheet, I’d make each Text Script conditional?