dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18055
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7452: Performance improvement in report table generation
------------------------------------------------------------
revno: 7452
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-06-28 23:14:29 +0200
message:
Performance improvement in report table generation
modified:
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java 2012-06-14 18:56:38 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java 2012-06-28 21:14:29 +0000
@@ -48,7 +48,8 @@
public class ExportTableAction
implements Action
{
- private static final String DEFAULT_TYPE = "html";
+ private static final String TYPE_DEFAULT = "html";
+ private static final String TYPE_JRXML = "jrxml";
// -------------------------------------------------------------------------
// Dependencies
@@ -159,8 +160,11 @@
{
ReportTable reportTable = reportTableService.getReportTable( uid );
- params.putAll( constantService.getConstantParameterMap() );
- params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) );
+ if ( TYPE_JRXML.equals( format ) )
+ {
+ params.putAll( constantService.getConstantParameterMap() );
+ params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) );
+ }
if ( useLast )
{
@@ -175,6 +179,6 @@
SessionUtils.setSessionVar( SessionUtils.KEY_REPORT_TABLE_GRID, grid );
- return type != null ? type : DEFAULT_TYPE;
+ return type != null ? type : TYPE_DEFAULT;
}
}