Unnecessary section break in table

Hello,

I noticed that Aspose generates unnecessary section breaks in tables. In my appended example, a table is created, which is more than one page in size. Jasper leads the table clean on the second page. But Aspose creates an unnecessary section break. See also Confrontation.docx in the zip file. Is there a solution for this problem?

Best regards, Achim

Hi Achim,

Thanks for your inquiry.

We suggest you please use page break parameter as PAGE_BREAKS_NONE to get the required output. Please check following code snippet and read following documentation link. Hope this helps you.

Configuring the page breaks

AWDocxExporter expAspose = new AWDocxExporter();
expAspose.setParameter(AWExporterParameter.USE_EXACT_ROW_HEIGHTS, Boolean.FALSE);
expAspose.setParameter(AWExporterParameter.PAGE_BREAKS, AWExporterParameter.PAGE_BREAKS_NONE);
expAspose.setParameter(AWExporterParameter.JASPER_PRINT, jasperPrint);
expAspose.setParameter(AWExporterParameter.OUTPUT_FILE_NAME, outAspose.toString());
expAspose.exportReport();

Hi Tahir,

that’s it. It works just fine. Thank you.

Best regards, Achim

Hi Tahir,

now I see that Aspose remove all page breaks. Even the page breaks that are in the templates explicitly inserted. This of course is not good. Why does Aspose generate a page break in my example, although none has been inserted into the template? Jasper generated there also no page breaks.

Best regards, Achim

Hi Achim,

Thanks for your inquiry.

rocko90:
Why does Aspose generate a page break in my example, although none has been inserted into the template? Jasper generated there also no page breaks.

We have logged this problem in our issue tracking system as WORDSJSP-170. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSJSP-170) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Tahir,

I have tested the 2.4.0 version. Unfortunately, there is no improvement with my problem. Can you look at that again please?

Best regards, Achim

Hi Achim,

Thanks for your inquiry.

We have tested the scenario and have not found the shared issue while using latest version of Aspose.Words for JasperReports 2.4.0. Please remove the old jar file from your application and add the new jar file of Aspose.Words for JasperReports 2.4.0 in your application. We have attached the output document with this post for your kind reference.

Hi Tahir,

Thanks for your review. I have created especially a second example. But even there, a section break is always generated. For my test I use Eclipse with JasperReports 5.6.0 and Aspose.Words 2.4.0 (aspose.words.jasperreports-6.1.1.jar). Do you have any idea how it can identify why it does not work with me?

Best regards, Achim

Hi Achim,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJSP-171. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Achim,

I am programmer who works on this issue (and worked on WORDSJSP-170 as well).

I think the problem here is in the following line of code:

expAspose.setParameter(AWExporterParameter.USE_EXACT_ROW_HEIGHTS,
Boolean.FALSE);

This parameter controls how table rows are processed. If it is TRUE (default value), then rows heights are exactly the same as in input report. If it is set to FALSE then rows heights sometimes may be increased for better fitting of internal content. In this case bottom rows may move down and total height of content may become greater than total page height. This results to moving some rows to new page.

So could you please remove (or comment this line) and check again on your side?

Thanks and regards,
Vadim

sorry, wrong user. Please ignore these post

Hi Vadim,

thanks for the quick reply. Yes, when I put the USE_EXACT_ROW_HEIGHTS parameter to TRUE, no section breaks are generated. But unfortunately, the parameter USE_EXACT_ROW_HEIGHTS must be set to FALSE so that the table can be edited. And in some cases, the letters pgjyq are cut deep below. Unlike Jasper, Aspose generated section breaks in tables where there are none defined in the templates. Jasper moves the lines on the next page too, but does not create a section break.

Best regards, Achim

Hi Achim,

Thanks for sharing the detail of your use case. We will inform you via this forum thread once there is any update available on this issue. Thanks for your patience.

Hi Achim,

so that the table can be edited

OK, clear.

Then I would propose some other workarounds.

As of v2.4.0 there is possibility to override page size explicitly. So you can use some larger page, for example:

expAspose.setParameter(AWExporterParameter.PAGE_SIZE, "Legal");

Another option is to decrease top and bottom page margins:

expAspose.setParameter(AWExporterParameter.PAGE_MARGINS, ";;16pt;8pt");

In this option left and right margins will not be changed while top and bottom margins will be set to 16pt and 8pt respectively.

Even the page breaks that are in the templates explicitly inserted.

Could you please send us an example of such template? I will analyze is it possible to leave those page breaks untouched when PAGE_BREAKS_NONE is set.

Thanks and regards,
Vadim

Hi Vadim,

thanks for your reply and sorry for my late response. We produce with Jasper many complicated lists whose templates have been developed in recent years. A change in the page size and page margins would be much too risky. We need exactly the format DIN A4. I 've attached an example, in the explicitly a section break is inserted after the first Subreport. If you use parameter AWExporterParameter.PAGE_BREAKS all breaks are removed in DOCX.

Best regards, Achim

Hi Achim,

Thanks for sharing the detail. We have logged this detail in our issue tracking system. You will be informed via this forum thread once there is any update available on this issue. Thanks for your patience.

The issues you have found earlier (filed as WORDSJSP-171) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.