dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10147
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2780: Added subtitle to GridPdfResult
------------------------------------------------------------
revno: 2780
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-01-29 08:57:17 +0100
message:
Added subtitle to GridPdfResult
modified:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.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-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2011-01-26 10:01:53 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2011-01-29 07:57:17 +0000
@@ -35,6 +35,7 @@
import org.amplecode.quick.StatementHolder;
import org.amplecode.quick.StatementManager;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.common.Grid;
@@ -195,8 +196,10 @@
try
{
ResultSet resultSet = holder.getStatement().executeQuery( "SELECT * FROM " + reportTable.getExistingTableName() );
+
+ String subtitle = StringUtils.trimToEmpty( reportTable.getOrganisationUnitName() ) + SPACE + StringUtils.trimToEmpty( reportTable.getReportingMonthName() );
- Grid grid = new ListGrid().setTitle( reportTable.getName() ).setTable( reportTable.getExistingTableName() );
+ Grid grid = new ListGrid().setTitle( reportTable.getName() ).setSubtitle( subtitle ).setTable( reportTable.getExistingTableName() );
// -----------------------------------------------------------------
// Columns