Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0056219 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Modules] Reporting | minor | always | 2024-08-08 20:21 | 2024-08-09 13:56 | |||||||
Reporter | ivazquez | View Status | public | |||||||||
Assigned To | AtulOpenbravo | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Regression date | ||||||||||||
Regression introduced by commit | ||||||||||||
Regression level | ||||||||||||
Review Assigned To | ||||||||||||
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")); | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
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 |
Copyright © 2000 - 2009 MantisBT Group |