dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23974
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11694: Fix bug - Exception thrown when to run Aggregate tabular report.
------------------------------------------------------------
revno: 11694
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-08-19 14:09:48 +0700
message:
Fix bug - Exception thrown when to run Aggregate tabular report.
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.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-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2013-08-13 06:11:05 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2013-08-19 07:09:48 +0000
@@ -1181,18 +1181,18 @@
sql += " dataelementid=" + deGroupBy + ") is not null AND ";
}
sql += " psi_1.programstageid=" + programStage.getId() + " ";
- sql += filterSQL + "LIMIT 1 ) ";
+ sql += filterSQL + "LIMIT 1 ";
}
- sql += " as \"" + periodName + "\" ,";
+ sql += " ) as \"" + periodName + "\" ,";
}
// -- end period
sql = sql.substring( 0, sql.length() - 1 ) + " ";
- sql += " ) ) ";
+ sql += " ) ";
sql += " UNION ";
}
- sql = sql.substring( 0, sql.length() - 10 );
+ sql = sql.substring( 0, sql.length() - 7 );
sql += " ORDER BY orgunit asc ";
if ( limit != null )
{
@@ -1274,10 +1274,10 @@
}
sql += " psi_1.executiondate >= '" + startDate + "' AND ";
sql += " psi_1.executiondate <= '" + endDate + "' ";
- sql += filterSQL + " LIMIT 1 ) ";
+ sql += filterSQL + " LIMIT 1 ";
}
- sql += " as " + aggregateType;
+ sql += " ) as " + aggregateType;
sql += " ) ";
sql += " UNION ";
}
@@ -1527,7 +1527,7 @@
{
for ( String deValue : deValues )
{
- sql += "(SELECT 0 as \"" + deValue + "\",";
+ sql += "(SELECT 0 ) as \"" + deValue + "\",";
}
}
else