Overlapping Jasper Frames in Word Exporter

Hello,

I am evaluating several of the Aspose components for use in our application. So far I am pretty impressed, as most of the things I have tried to do “just work”. Having used POI for a while . . . well, never mind about that now.

I am seeing one thing that I haven’t been able to solve. We use Jasper to generate reports. In many cases we use a gray Frame that overlaps the detail band, and then use a PrintWhen expression to cause this to appear on every even numbered row. This provides alternating backgrounds in the output, making it (slightly) easier to read the report.

When I use AWDocExporter to generate a Word version of this, it seems like whenever the band appears it is always on it’s own table row, beneath the one it should be overlapping. This is regardless of how I set the OVERLAP_RESOLUTION_METHOD. If I use AWDocxExporter, then setting OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS sometimes causes the gray bar to overlap as I would expect, but in other cases it still just appears in its own row.

This might not be that big a deal except that when this frame appears in its own row it does odd things to the pagination in word, and we end up with things like “Page 3 of 7” appearing on two distinct pages.

My hope is that I could change some options to the Exporter class and this would produce acceptable output without having to change each jasper configuration. It seems like TRUNCATE_ITEMS would do what I want, it just isn’t working in most cases. Can you provide any insight? Thanks.

Hi

Thanks for your request. Could you please attach your .jrprint file here for testing? We will check the issue and provide you more information.
Best regards.

Thanks for your reply. We typically haven’t worked with jrprint files, so I hope this is the right thing Let me know if it isn’t. I’m also attaching the .doc file that we get back . . . you’ll notice a number of gray rows at the lowest level of detail.

This is the code that generates the .doc file from the JasperPrint object:

public static void saveToDOC(JasperPrint jp, OutputStream out, Map exportParams) throws JRException
{
    AWDocExporter exporter = new AWDocExporter();
    if (exportParams != null)
    {
        exporter.setParameters(exportParams);
    }

    // I've tried this in case the default was incorrect but it didn't help
    // exporter.setParameter(AWExporterParameter.OVERLAP_RESOLUTION_METHOD, AWExporterParameter.OVERLAP_RESOLUTION_METHOD_TRUNCATE_ITEMS) ;

    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
    exporter.exportReport();
}

Hi,

Thank you for additional information. I logged your request into our defect database. The developer, who is responsible for Aspose.Words for JasperReports, will investigate the problem and answer you shortly.
Best regards.

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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.