dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18381
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7730: Some Modification in CCEM JRXML
------------------------------------------------------------
revno: 7730
committer: Samta <samta-bajpayee@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 13:32:34 +0100
message:
Some Modification in CCEM JRXML
modified:
local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/action/GenerateJRXMLReportAction.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 'local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/action/GenerateJRXMLReportAction.java'
--- local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/action/GenerateJRXMLReportAction.java 2012-07-26 10:33:54 +0000
+++ local/in/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/reports/action/GenerateJRXMLReportAction.java 2012-07-26 12:32:34 +0000
@@ -776,9 +776,42 @@
frb.setColumnsPerPage(1, 10).setUseFullPageWidth(true);
frb.setTemplateFile( path+"ORGUNIT_EQUIPMENT_ROUTINE_DATAVALUE.jrxml" );
-
- Map content=new HashMap();
- tableData.add( content );
+
+ String dataElementIdsByComma = "-1";
+ String optComboIdsByComma = "-1";
+
+ for( Integer orgUnitGroupId : orgunitGroupList )
+ {
+ OrganisationUnitGroup orgUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( orgUnitGroupId );
+ orgUnitGroupMembers.addAll( orgUnitGroup.getMembers() );
+ }
+
+ for( Integer orgUnitId : selOrgUnitList )
+ {
+ orgUnitList.addAll( organisationUnitService.getOrganisationUnitWithChildren( orgUnitId ) );
+ }
+
+ orgUnitList.retainAll( orgUnitGroupMembers );
+ for( OrganisationUnit orgUnit : orgUnitList )
+ {
+ Map<String, String> numberOfData=new HashMap<String, String>();
+ List<String> oneTableDataRow = new ArrayList<String>();
+ String orgUnitBranch = "";
+ if( orgUnit.getParent() != null )
+ {
+ orgUnitBranch = getOrgunitBranch( orgUnit.getParent() );
+ }
+ else
+ {
+ orgUnitBranch = " ";
+ }
+
+ numberOfData.put( "OrgUnit Hierarchy", orgUnitBranch );
+ numberOfData.put( "OrgUnit", orgUnit.getName()+"" );
+ numberOfData.put( "OrgUnit Code", orgUnit.getCode()+"" );
+ tableData.add( numberOfData );
+ }
+
JRDataSource ds = new JRMapCollectionDataSource(tableData );
DynamicReport dynamicReport = frb.build();
dynamicReport.getOptions().getDefaultDetailStyle().setBackgroundColor( Color.BLUE );