View Single Post
 
Old 11-03-2021, 04:26 AM
catflap's Avatar
catflap catflap is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Aug 2015
Location: UK
Posts: 72
catflap is on a distinguished road
Default Advice please - too many merge fields!

Hi


I've been asked to help one of my colleagues who is going to be receiving what is essentially a relational database from a client, but as a flat file, to be sent a letter with accompanying pages of tables with billing info.



So he will get 8 fields of an address, followed by 22 fields of billing info for each bill referenced for this address.


The example we've got is for 1 address with 65 different bill references, so it's a single row of data with 1438 fields, which is clearly bonkers!


What's worse, they want each of the bill references (22 fields) to be on separate line of a table in a document.



As far as I'm aware, you can't set up a merge to a table so that it adds a row for each set of fields that is occupied - you have to define the rows 'up front'. We can't put in the maximum number of rows as it would mean a lot of blank rows for those records with only a few bill references.


Obviously inserting 1438 fields is going to take an absolute age and is impractical in itself.



Could anyone suggest the best way to approach this problem? - needless to say going back to the client is not an option as this is the only way they can send the data to us.


I do know some VBA and vb.net, so could do some macros to prep the data before the merge. I'm still a little stumped as to the best approach though.


Any ideas? ........(please!)
Reply With Quote