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

Free Support Forum - aspose.com

Header and footer on the loose after upgrade

Hi all,

At my company we are working on upgrading from iReport 5.1.0 to JasperSoft Studio 6.20.0, and with this move also upgrade Aspose.Words for JasperReports from 19.12 to 22.12.
Not sure if it matters but we are using generated XML-files as datasources for our reports.

Most seems to go well but we are having an issue with headers and footers on the reports no longer sticking in the header and footer part of the word documents we are creating and I was wondering if anyone have had similar issues or if there is anything I can look at to fix this. This makes it so the footer isn’t always at the end of the document and also gives us one last page with only the header and footer information which can be quite annoying.

It worked previously and haven’t changed anything in the reports, only updated versions so was searching for any help.

Not sure if it is a Jasper issue or Aspose issue but the previous in Jasper doesn’t seem to place the header/footer correct in docx so I assume it is related to Aspose to put them where they should be.

One aspose thing I found was to et AWExporterParameter.RECOGNIZE_FIELDS = true which we have since before.

Have a good day

Write you later / Mårten

@marten.carlzon Could you please attach your sample report and output documents produced by the old and new versions of Aspose.Words for JasperReports? We will check the issue and provide you more information.

Sorry, missed it and went home from work shortly after posting my question.
But here is the entire setup for the report. b_rapport.jrxml is the main report, DataSource.xml is the xml with the data to build the report from. And then two word documents showing the result, one with the old versions, and one with the new versions.
I am finding more differences/errors but I think the header/footer issue is my biggest and if that can be resolved I hope I can fix the rest :slight_smile:

Thanks for any help
Write you later / Mårten

b_rapport.7z (83.5 KB)

@marten.carlzon Thank you for additional information. For a sake of correction the problem has been logged as WORDSJR-335. We will keep you posted and let yo uknow once it is resolved or we have more information for you.

1 Like

I am not sure if it would help, but remembered that maybe the settings we have could be an indication too (although we changed nothing with the update)

And just curious if it is possible for any ETA? As we are about to deliver to a customer and we would like to have some information to them. But as a developer myself I know it is not always easy to find these type of errors so is most if you have any information, otherwise it will take the time it takes :slight_smile:

AWDocxExporter exporter = new AWDocxExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

// Tvinga section-breaks för att det ska se correct ut vid liggande
final boolean isLandscape = jasperReport.getOrientationValue() == OrientationEnum.LANDSCAPE;
		isLandscape ? AWExporterParameter.PAGE_BREAKS_SECTIONS : AWExporterParameter.PAGE_BREAKS_NORMAL);

exporter.setParameter(AWExporterParameter.LICENSE, args.getLicenceFilePath());
if (args.isUseDefaultMargins()) {
	exporter.setParameter(AWExporterParameter.PAGE_MARGINS, "85pt;70pt;28pt;14pt");
exporter.setParameter(AWExporterParameter.RECOGNIZE_FIELDS, true);
exporter.setParameter(AWExporterParameter.EXPORT_LINES, true);
exporter.setParameter(AWExporterParameter.SPACING_FACTOR, 0.5d);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, args.getGeneratedReportPath());
exporter.setParameter(AWExporterParameter.USE_EXACT_ROW_HEIGHTS, args.isUseExactRowHeights());
exporter.setParameter(AWExporterParameter.POSITIONED_STYLE, "EmptyStyle");
if(args.getDocxCompatibility() != null) {
	exporter.setParameter(AWExporterParameter.DOCX_COMPATIBILITY, args.getDocxCompatibility());


@marten.carlzon Currently, the issue is scheduled to be resolved before the next 23.1 release of Aspose.Words for JasperReports. This version will be released within a month or so. But please note, this is a rough estimate and can be shifted.
We will be sure to inform you once the fix is available.

Okay thanks! Yea, totally understand it can be shifted but always good to have something to have as a potential date even though it can be delayed so thanks again.

1 Like