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

Free Support Forum - aspose.com

Incorrect line direction error in aspose words for jasperreports

I tried the product but with the first report I got an error : “Incorrect line direction”.
Here my code

AWDocxExporter exporter = new AWDocxExporter();
exporter.setExporterInput(new SimpleExporterInput(xpPrint));
ByteArrayOutputStream output = new ByteArrayOutputStream();
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(output));
SimpleDocxReportConfiguration config = new SimpleDocxReportConfiguration();
config.setFlexibleRowHeight(true); //Set desired configuration
exporter.setConfiguration(config);
exporter.exportReport();
byte[] result = output.toByteArray();
return result;

Tks

@AxiomaBo You should specify input and output as parameters, like shown in the example below:

   AWDocExporter exporter = new AWDocExporter();
   File sourceFile = new File(fileName);
   JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile);
   exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
   File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".doc");
   exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());
   exporter.exportReport();

Sorry but :
. I don’t want my output on file but on a byte array
. I don’t have my jasperprint on a file
. JRExporterParameter is deprecated since jasper 5.6
Tks

Anyway I tested as You told me and nothing changed.
The same error.
Tks

@AxiomaBo Could you please attach your report here for testing? We will check the issue and provide you more information.

reports.7z (244.7 KB)
Quite complex set of reports and subreports.
Hope this helps to help me.
Tks

@AxiomaBo Thank you for additional information. We have found place in the code where the exception is thrown. We are going to publish new version of Aspose.Words for JasperReports within 1-2 days. We will let you know once it is available and you will be able to test your report with new version.

@AxiomaBo We have just release 22.2 version of Aspose.Words for JasperReports. Could you please check it on your side and let us know if the problem still persists?

The problem is still there.
The new error is “The requested border is not available for this object.”.
Tks

@AxiomaBo Thank you for additional information. I have logged this problem as WORDSJR-323. We will keep you informed and let you know once it is resolved.