In my report the number of XRTable rows isn't fixed and depends on data provided each time when a detail band is printed. So, I need to add table rows at runtime.
for this I wrote code in BeforePrint event of Detail , but the problem is that it is adding more and more rows as per records in the dataset for example for the 1st record it is adding 1 row for the 2nd it is addming 2 rows and so on..
code i wrote is as follows
Dim tableCell As New XRTableCell
tableCell.Name = "newCell"
tableCell.Text = "NewCell"
tableCell.Width = 200
' Change the table.
XrTable2.Width = XrTable2.Width + tableCell.Width
'' Perform the table's layout.
this is an urgent issue.
Is your table adjusted to show data from the same DataSource as the Report. If so, you should use the Report's BeforePrint event and create a single row in the Table, fill it with Cells and finally bind them to data. I have attached a sample project showing how this can be done. Please let us know if this solution meets your requirements or not.
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.