Multiple records on the same page

462 views
Skip to first unread message

Derek Shoales

unread,
Jan 9, 2018, 8:58:57 AM1/9/18
to XMPie Interest Group
Hello Everyone,

I've got a project that someone asked if we could do in XMPie or not, and I can't think of an easy way to do it but I'd thought I'd put it out to the group.

Is there a way to have multiple records in a .CSV display on the same page of a document, without using impositioning, so that each record honor Suppressing Trailing Spaces within the text block.

I'd like it to resemble the following, but with each FullName being a different record from the data source:

FullName (row 1 of .csv)
Address
Phone1
Phone2

FullName (row 2 of .csv)
Address
Phone1
Phone2

FullName (row 3 of .csv)
Address
Phone1
Phone2

If I just copy each block of text (FullName, Address, Phone1, and Phone2) multiple times in the same text field, and then assign the FullName Content Object to each FullName in the text field for example, XMPie will simply display the same record in the .csv however many times I've got it on the same page. It would instead look like:

FullName (row 1 of .csv)
Address
Phone1
Phone2

FullName (row 1 of .csv)
Address
Phone1
Phone2

FullName (row 1 of .csv)
Address
Phone1
Phone2

Also, the amount of data is enough where merging multiple records into a single row of the .csv and calling each FullName1, FullName2, FullName3, etc. wouldn't be feasible. Any ideas would be greatly appreciated, thanks.

Andrew Davies

unread,
Jan 9, 2018, 11:34:08 AM1/9/18
to XMPie Interest Group
Why is the merge not feasible?
If it is because it would take too much time to do it by hand here is an idea:


You could do the merging thing in SQL (so done on the fly rather than by hand)
You could use the ROW_NUMBER() function, and the modulus operator in sub queries to select every nth row (where n in the number of records on one page).
You would then have one query that selects FullName1 from the first sub query, FullName2 fro the second sub query e.t.c.

This would mean that your XMPie plan is still linked to the original data source, but uses a filter to transpose the data source into a new format


If it is not feasible for some other reason... hopefully someone else has a better idea.

Derek Shoales

unread,
Jan 9, 2018, 12:14:43 PM1/9/18
to XMPie Interest Group
Hi Andrew,

The customer has given us a pretty short timetable to accomplish this, and our data guy has extreme reservations about manipulating the data so he doesn't want to do that manually.

We didn't consider SQL as we aren't well versed in it.

I did come up with a solution that uses impositioning by making the page size the height and width of the record, and will impo them up 5-7 times on the page. That way we can replicate this with minimal manual intervention when the customer sends us this job repeatedly.

I'll certainly take a look at your SQL solution once we've had a chance to breathe. Thanks.

couch

unread,
Jan 9, 2018, 3:50:58 PM1/9/18
to XMPie Interest Group
1) if the layout is the same for each record on the sheet - consider using "step and repeat" imposition - design the page smaller than required so that when you impose, you get the final sheet size.

2) Use a plan filter to select only the first record for each sheet and a number of user views to get each following record for the sheet - EG assuming 6 records per page: 

Create a Filter for the Recipients Information 

First create a Plan Filter that will select the first and each following sixth record (records 1, 7, 13, etc) 
 
Select [Sheet1].[ID], [Sheet1].[Name] 
From [Sheet1] 
Where [Sheet1].[ID] mod 6 = 1


Create 5 UserViews that read the next 5 records, one for each view 


UserView called Position2 – pulls the next record after Filter 
Select [Sheet1].[ID], [Sheet1].[Name] 
From [Sheet1] 
Where [Sheet1].[ID] = ( |->[ID]+ 1)

UserView called Position3 – pulls the 2nd record after Filter 
Select [Sheet1].[ID], [Sheet1].[Name] 
From [Sheet1] 
Where [Sheet1].[ID] = ( |->[ID]+ 2)

UserView called Position4 – pulls the 3rd record after Filter 
Select [Sheet1].[ID], [Sheet1].[Name] 
From [Sheet1] 
Where [Sheet1].[ID] = ( |->[ID]+ 3)

UserView called Position5 – pulls the 4th record after Filter 
Select [Sheet1].[ID], [Sheet1].[Name] 
From [Sheet1] 
Where [Sheet1].[ID] = ( |->[ID]+ 4)

UserView called Position6 – pulls the 5th record after Filter 
Select [Sheet1].[ID], [Sheet1].[Name] 
From [Sheet1] 
Where Sheet1].[ID] = ( |->[ID]+ 5)

In the above select statements be sure to call the fields required for each recipient dataset as these values will be come the ADOR / Content object values... 


Create Content Objects / ADORs for the extra recipient fields

The Content Object expression for the first recipient's name should take the value from the recipient schema:
|->[Name]

The Content Object expression for the second recipient should take the value from the Position2 UserView:
[Position2][0].[Name]
Create additional Content Objects for following recipients using the respective UserView. For example, the Content Object for the next (third) recipient would be:
[Position3][0].[Name]

Derek Shoales

unread,
Jan 9, 2018, 5:07:42 PM1/9/18
to XMPie Interest Group
Thanks Couch for the Plan Filter suggestion. I figured out option 1 once I took a step back from the project, but I hadn't considered using Plan Filters. That will definitely work for future versions of this job, thanks a lot.

smn...@gmail.com

unread,
Sep 24, 2020, 5:23:20 PM9/24/20
to XMPie Interest Group
Hi Steve,

I have the User Views and table adors working as you mentioned above. my only concern is i have A LOT of records and to do +1, +2, +3...is going to be a nightmare. is there a way to ask for "next record" or something?

just hoping i don't have to create 100s of user views.

thanks in advance.

Shanna Nitto (xerox)

ke...@blitzprint.com

unread,
Oct 21, 2021, 11:57:13 AM10/21/21
to XMPie Interest Group
Hi All
I know this might be to late, but when I was using a similar software called Darwin it came with an extra piece of software called creo multi up. It would take a csv file and depending on how many times you wanted it to be n-up you could tell it 2x, 3x, 4x and so on, it would take your header row and multiply it by the number you requested
 (first name1, last name1, first name2, last name2, and so on) then move all the rows to match and you could have it keep in order or not depending on what no needed. I still have a copy of it, but only runs on mac os 9. But if you know a programmer they could probably create one for you.
Kelly

Reply all
Reply to author
Forward
0 new messages