LINQ Reporting Engine - When we have a single cell/column in the table row then it retains empty row post document generation

When we have a table with single/multiple rows and row has a single cell and if we don’t have any records to show then it shows an empty row but same scenario when have more than one column in a table row then it doesn’t show any empty row and it works as expected.

@Team, could you please look in to the issue when we have a single column in a row and please let us know.

@Rajmal,

It seems you are using Aspose.Words API, is not it? I am moving your thread to respective forum where one of our colleagues from Aspose.Words team will evaluate your issue and assist you accordingly.

@Rajmal could you please provide a file that showcases the current issue along with the expected output file? This will allow us to analyze the problem more accurately and provide you with appropriate solutions.

Hi @eduardo.canal,

I have attached template and generated document for both scenario when we have data and no data. We have two issues as below:

Case1: When we have no data present in ‘products’:
We are getting an empty row in case of single column but we are not getting any empty row in case of multiple columns.

Case2: When we have data present in ‘products’:
We are getting all the rows properly in the multiple column table but in case of single column we are getting all the data in the same row.

Could you please look into these and let us know asap. We are having aspose license.

RepeatTable_Template.docx (13.7 KB)
RepeatTable_GeneratedWithoutData.docx (26.0 KB)
RepeatTable_GeneratedWithData.docx (26.3 KB)

1 Like

@Rajmal

Is it expected that for the single-column case, all names are located within the single cell?

Hi @ivan.lyagin,

No in case of single-column case we should have separate rows for all the names. Currently in case of multiple-column case it is working as expected but in case of single-column it is not working as expected.

@Rajmal

For cases like this, the engine provides the gready switch that can be applied as follows:

<<foreach ...>>...<</foreach -greedy>>

Please note that it should be used only for single-column table-row data bands.

Applying of the switch should provide expected results in the both cases: with and without data present.

More information on the subject can be found at the end of Working with Table-Row Data Bands.

1 Like

@ivan.lyagin Thanks a lot for the quick response. We have made changes and It resolved our issue. :slight_smile:

Thank you.

1 Like