We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Work with Table-Row Conditional Blocks using .NET | LINQ Reporting

Hi,

I was playing with cell merge in linq template. As per the document, I applied <<cellmerge>> and it started working. What I want to achieve is, if a member has multiple addresses, his member name and his date of birth should be merged across rows. But I don’t want to merge date of birth for two members, even those two members shares same date of birth and appears consecutive to each other. Which is not working.

If you refer following example, for Member 1, as he has two addresses, it is working correctly. Member 2 has different date of birth, so he is coming in a different row. But since Member 3 and Member 4 have same date of birth, this column is getting merged across members. I want to make date of birth column to merge only at member level. Could you please help me in this?

artifacts.zip (130.7 KB)

@ankurm1

Could you please ZIP and attach you expected output document? We will then provide you more information on this along with code.

You can check attachment artifact.zip. I have attached it in question as well. It contains code, sample document file (addressdemo.docx) and sample PDF output file (SaveDoc2Pdf.pdf).

@ankurm1

The ZIP file contains the input and output documents. The LINQ Reporting engine merge the table’s cell correctly.

Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate how you want your final output be generated like. We will then provide you more information on this along with code.


Expected output is addressdemo-expected.zip (52.9 KB)

@ankurm1

We have modified the template document and attached it with this post. You can use this template to get the desired output. Docs.zip (110.2 KB)

We suggest you please read the following articles.
Appendix A. Enumeration Extension Methods
Appendix C. Typical Templates

@tahir.manzoor

I went through the modified file. It is giving closer results. I went through both of the links but I am not able to find anything related to this particular case. I am referring typical templates section throughout my work.

Please refer to following zip file. I have attached output and expected results. This is based on the template you provided previously. In this case if one of my cell expands, then inner table is not adjusting it correctly. This is giving a false representation of an extra blank row.

artifacts2.zip (123.0 KB)

@ankurm1

You can use the following if syntax to remove the empty rows.
<<if [false]>>Content to remove<</if -greedy>>

Please refer to the following article for more detail.
Working with Table-Row Conditional Blocks

If you still face problem, please share the code example (data source) that you are using to reproduce the problematic output. We will investigate the issue and provide you more information on it.