The application I’m building calls for users to be able to create product information sheets which include data from the product record along with related tables of other information such as product features, sales locations and recent sales history for the product.
The user selects the products they want from a datagrid, and then clicks “print”.
I’ve tried merging regions separately and merging an entire dataset, but I either get only the last selected product record, or no records at all. Also, when I do get that last record, the associated tables (features, etc.) only show the last items.
Any help would be much appreciated!
From what you are saying everything should be okay.
If you get no records, check that the name of the merge region specified in the document matches the DataTable.TableName property.
It will help if you email your document to firstname.lastname@example.org along with the source code and maybe you can save the dataset into an XML file and email it too.
Thanks for the files.
The problem was only with merge fields in textboxes. A textbox in a Word document is anchored to some character position. In your case the anchor positions for the product image and product features were not suitable and I changed them by moving the anchors one or two paragraphs down.
1. The product image is related to the “lising” region and the anchor should be inside the repeatable region, not outside.
2. The list of features textbox anchor was inside the “description” region, but it should be outside in the main text.