createAndSaveReport dublicates file extension (*.pdf.pdf)

Hello,

I created an Report with an docx Template. The report generates a PDF file. I execute the report in my application as follows:
FileDescriptor fileDescriptor = reportService.createAndSaveReport(report, paramMap, “Invoice” );

If I check the file name within the fileDescriptor the file name ist “Invoice.pdf.pdf”. I debugged the report generation code and found within the ReportServiceBean the code:
(Line 514)

protected FileDescriptor createAndSaveReportDocument(ReportRunParams    reportRunParams) {
    ReportOutputDocument reportOutputDocument = createReportDocument(reportRunParams);
    byte[] reportData = reportOutputDocument.getContent();
    String documentName = reportOutputDocument.getDocumentName();
    String ext =    reportRunParams.getReportTemplate().getReportOutputType().toString().toLowerCase();
     return saveReport(reportData, documentName, ext);
}

The method getDocumentName() adds an “.pdf” to the file name and the method saveReport(…) does it again.

Best Regards
Michael

Hi,
We have fixed the problem in the pull request: https://github.com/cuba-platform/reports/pull/280.
The fix will be available in the next update release 7.2.