Openbravo Issue Tracking System - Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0056219 | Modules | Reporting | public | 2024-08-08 20:21 | 2024-08-09 13:56 |
Reporter | ivazquez | ||||
Assigned To | AtulOpenbravo | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Regression date | |||||
Regression introduced by commit | |||||
Regression level | |||||
Review Assigned To | |||||
Support ticket | |||||
OBNetwork customer | |||||
Regression introduced in release | |||||
Summary | 0056219: Add parameter to generate the report | ||||
Description | Add language parameter to generate the report with the function generateJasperPrint Add new parameter and control if we dont have the parameter | ||||
Steps To Reproduce | 1 - Generate a report. | ||||
Proposed Solution | --- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java 2024-06-06 08:30:24.718413000 +0200 +++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java 2024-08-08 15:36:32.978050000 +0200 @@ -944,16 +944,30 @@ /** * Generates a compiled, translated and filled report into a JasperPrint object. + * + * @deprecated The compileSubreports parameter has no effect. Therefore, use + * {@link ReportingUtils#generateJasperPrint(String, Map, ConnectionProvider, JRDataSource, String)} + * instead. + */ + @Deprecated + public static JasperPrint generateJasperPrint(String jasperFilePath, + Map<String, Object> parameters, + ConnectionProvider connectionProvider, JRDataSource data) throws OBException { + return generateJasperPrint(jasperFilePath, parameters, connectionProvider, data, null); + } + + /** + * Generates a compiled, translated and filled report into a JasperPrint object. * * @deprecated The compileSubreports parameter has no effect. Therefore, use - * {@link ReportingUtils#generateJasperPrint(String, Map, ConnectionProvider, JRDataSource)} + * {@link ReportingUtils#generateJasperPrint(String, Map, ConnectionProvider, JRDataSource, String)} * instead. */ @Deprecated public static JasperPrint generateJasperPrint(String jasperFilePath, Map<String, Object> parameters, boolean compileSubreports, ConnectionProvider connectionProvider, JRDataSource data) throws OBException { - return generateJasperPrint(jasperFilePath, parameters, connectionProvider, data); + return generateJasperPrint(jasperFilePath, parameters, connectionProvider, data, null); } /** @@ -967,13 +981,15 @@ * A connection provider in case the report needs it. * @param data * The data to be used in the report, if required. + * @param language + * The language to be used in the report, if required. * @return A JasperPrint object with the compiled, translated and filled report. * @throws OBException * In case there is any error processing the report an exception is thrown with the * error message. */ public static JasperPrint generateJasperPrint(String jasperFilePath, - Map<String, Object> parameters, ConnectionProvider connectionProvider, JRDataSource data) + Map<String, Object> parameters, ConnectionProvider connectionProvider, JRDataSource data, String language) throws OBException { long t1 = System.currentTimeMillis(); try { @@ -990,7 +1006,9 @@ if (parameters.get("REPORT_QUALIFIER") != null) { language = getReportLanguage(parameters); } else { - language = OBContext.getOBContext().getLanguage().getLanguage(); + if (language == null) { + language = OBContext.getOBContext().getLanguage().getLanguage(); + } log.debug( "The context language will be used because \"REPORT_QUALIFIER\" was not found into report parameters: {}", parameters, new Exception("stack trace")); | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2024-08-08 20:21 | ivazquez | New Issue | |||
2024-08-08 20:21 | ivazquez | Assigned To | => Triage Omni WMS | ||
2024-08-08 21:43 | Practics | Issue Monitored: Practics | |||
2024-08-09 13:56 | ruben_jimenez | Assigned To | Triage Omni WMS => AtulOpenbravo |
There are no notes attached to this issue. |