I have written a sample program with 2 data tables, 1 master & 1 details. When I generated the report, only the master portion is generated correct but all details reports in master portion are not populated.
A template IHCTemplate2.docx is included in the project, please copy to the root prior to run the program.
Please review if I have built the template or datatables incorrectly.
Thanks for correcting the template. The program merges correctly. Now, I have added the IFieldMergingCallBack to change the color of each row in the details table to specific color based on Score column value of that row. To pull the Score value of current row, I use e.RecordIndex. However, the e.RecordIndex does not point to the actual row in the DataTable but rather the row being output.
In this case, the document outputs 3 tables so e.RecordIndex is always 0 and Score value is at the 1st row of details DataTable. Is there a way to determine actual row index where the field value comes from?
See my attached project and copy the IHCTemplate3.docx to root c:\ prior to run.