Hi Team,
We are using aspose linq reporting engine for document generation and we have a scenario like -
We have a table with one-row, one-cell and we have a child table in the cell. Child table, rows we are rendering dynamically using foreach syntax based on no of rows present.
We have some condition applied on the child table, in this case aspose linq engine throwing error as below.
InvalidOperationException: Tag ‘if’ is not well-formed. A data band or conditional block affecting table columns cannot be in a nested table if the table is in a cell occupied by another data band or conditional block affecting table columns.
I have attached the sample template for reference.
AsposeTemplate.docx (138.4 KB)
Can someone please look into this and let us know if we are doing anything wrong?
@RajmalConga
It seems that you are encountering a limitation with the Aspose LINQ Reporting Engine when trying to nest tables with conditional blocks or data bands. The error message you received indicates that having a nested table with a data band or conditional block in a cell that is already occupied by another data band or conditional block is not allowed.
To resolve this issue, consider restructuring your data representation. Instead of nesting one table within another, you might want to explore alternative ways to organize your data that do not involve nested tables. This could involve flattening your data structure or using a different layout that avoids the need for nested tables.
If you need further assistance, please share more details about your data structure and the specific conditions you are trying to implement. This will help in providing more tailored advice.
For more insights, you might want to check the discussion on this topic in the forum, where it was noted that nesting tables with column data bands can lead to such exceptions, and alternative approaches were suggested.
Sources:
[1]: Linq Reporting Multi Nested table with dynamic Columns
[2]: Linq Reporting Multi Nested table with dynamic Columns
@RajmalConga Unfortunately, you have encountered the current limitation of the feature and the exception literally says what is the reason. Maybe, it is possible to use another way of representing data with less nested tables?
@alexey.noskov Thanks for quick response.
Do we have any plans or any action item from Aspose side to resolve this in near future?
@RajmalConga No, unfortunately, we do not have plans to change this. So I would suggest you to avoid table nesting in your template or remove -horz
switch from one of the conditions.