Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0056219
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Modules] Reportingminoralways2024-08-08 20:212024-08-09 13:56
ReporterivazquezView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release
Summary

0056219: Add parameter to generate the report

DescriptionAdd language parameter to generate the report with the function generateJasperPrint

Add new parameter and control if we dont have the parameter
Steps To Reproduce1 - 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"));
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- 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
Powered by Mantis Bugtracker