I have a data set that contains multiple tables that is generated at runtime. From that data set, I need to dynamically create a report that contains multiple tables. The tables may have a different layout (e.g. column number) and may spread over multiple pages, therefore I would like to repeat a table header for a certain table on all pages that contain that table.
I looked at your example on how to create a table dynamically but I cannot get it to work with multiple tables. Do you have sample code that shows how to do that?
Your help is much appreciated!
I am attaching my source code with the hope that it will help you pinpoint what I am doing wrong.
Attached source code unsuccessfully tries to display 3 dynamically created tables in a report.
Thank you for your help!
Thanks for posting the sample project. I see the problem.
Since you generate the report at runtime, you should be aware that the DetailReport band isn't automatically expanding, depending on the current XRTable size.
So, you should update the addTable method as follows:
Detail1.Height = tableDetail.Height; // use the XRTable.Height (was: Detail1.Height = 20)
Also, you can display your report contents via DetailReport bands in bound mode. For a reference, see this KB article: How to display the number of data tables in a single report document.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.