Issue with Linq cell merge

Hello,

Currently am using Aspose words to generate the pdf using LINQ-reporting in MSWord to convert the word to PDF.
we have a requirement to use cell merge to merge the cell in one column and it is working fine, But without completing the merge, a borderline is coming at the end of every page. Below is the screenshot:

Actually, a border should appear when the merge is completed between part 2 and part 3. Now it is working above part 3, but it is coming at the end of every page, So It should show when the merge is completed between part 1, part 2, part 3, and part 4 not at the end of every page.
Like below Image:

Attached is the zip file for the ms word template, sample file, and Json Data below:
Ms word template : ForAsposeTest.docx,
Input json file : Aspose-test-data.json,
Sample generated file: TestReport.PDF

Thanks
Vinaykumar saka


AsposeTestReport.zip (75.8 KB)

@vinaykumar_Saka

Thanks for your feedback. We are looking into the problem; in the meantime, please confirm which API you are using: Aspose.Words for .NET or Aspose.Words Cloud?

Hi @tilal.ahmad,

Thanks for the response, We are using, .net SDK.
Package Name: Aspose.words,
Version: 23.1.0.

For your reference,

@tilal.ahmad To get the desired output you should disable bottom border of the table in your template. When table has a bottom border, MS Word shows this border at the bottom of each page the table spans, so Aspose.Words does when render the document to PDF. However, if you disable the bottom border of the table there will not be border at the end of the table. You can overcome this by adding a top border of the paragraph after the table. For example see the modified template and the output document produced using this template:
in.docx (31.0 KB)
out.pdf (72.2 KB)

Hi @alexey.noskov,

I tried with your template, and I am still able to see the border,
Can you please give me the defined steps on how I can disable the bottom border of the table in MS word? So I can edit myself.

Below is a screenshot from the generated template.
image.png (132.7 KB)

@vinaykumar_Saka Select whole table, then go to borders and shading and disable bottom border:

Here is code I used for testing:

Document doc = new Document(@"C:\Temp\in.docx");
JsonDataLoadOptions options = new JsonDataLoadOptions();
options.AlwaysGenerateRootObject = true;
JsonDataSource ds = new JsonDataSource(@"C:\Temp\Aspose-test-.data.json", options);
            
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, ds);

doc.Save(@"C:\Temp\out.docx");
doc.Save(@"C:\Temp\out.pdf");

Here is template, data and output documents: docs.zip (342.9 KB)

As you can see in my output document there is no redundant border.

Hi @alexey.noskov,

And one more thing is, we need the border below the row for the columns Family, FabricColor, OpennessFactor, Marketing Model, and Status.
But in your case, it removes the border in the above columns, we should erase the border for the column fabric deck until we see the group value i.e, part 3 (For example we can see the border at the page of the end or starting of the page. To identify merge value is not yet completed).

image.png (92.8 KB)

For your reference, We need exactly like below:
image.png (117.0 KB)

@vinaykumar_Saka You can enable bottom border of cells, that are not merged upon building the report:

Please see the modified template and the output PDF document:
in.docx (31.1 KB)
out.pdf (72.2 KB)

You should note that Aspose.Words is limited to what you can do in MS Word.

Thank you @alexey.noskov,

Used your template and it works for me.
Finally, am facing one more issue
For column Fabric deck we used merge cell, If I try to align the value with the same row, it is not in the same line.
.

@vinaykumar_Saka This occurs because different vertical alignment is uses in the first column and in the rest columns:

Change your template to use the same cell vertical alignment in all columns to get the desired output. Please find the attached changed template: in.docx (31.1 KB)

Hi @alexey.noskov,

Yeah if we set it to vertical-align, it is working but all the row values should be centered including the Fabric deck.

I checked the center alignment for the fabric deck value and it is going to be centered with the 2 merge values vertically between part 1 and part 2( part 1 should be aligned with the first row and centered. Similarly part 2).

@vinaykumar_Saka Unfortunately, this is an expected behavior. When you use vertical align center, it is not always possible to line baselines with the content in cell with vertical align top or bottom. Of course, you can play with top and bottom cell margins but this will not work if accidently there will be more then one line in the cell with vertical align center: