=== modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/ExportToExcelAction.java' --- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/ExportToExcelAction.java 2010-12-08 07:24:10 +0000 +++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/ExportToExcelAction.java 2011-05-24 08:25:51 +0000 @@ -22,7 +22,7 @@ { return inputStream; } - + /* private String contentType; @@ -32,6 +32,8 @@ } */ + + private String fileName; public String getFileName() @@ -54,6 +56,13 @@ { this.htmlCode = htmlCode; } + + private String htmlCode1; + + public void setHtmlCode1( String htmlCode1 ) + { + this.htmlCode1 = htmlCode1; + } /* private StringBuffer htmlCode; @@ -67,13 +76,24 @@ // Action implementation // ------------------------------------------------------------------------- + + public String execute() throws Exception { - + System.out.println( "Inside Excel Import Action" ); fileName = "dataStatusResult.xls"; - - inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode.getBytes("UTF-8") ) ); - + + if( htmlCode != null ) + { + inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode.getBytes("UTF-8") ) ); + } + + else + { + inputStream = new BufferedInputStream( new ByteArrayInputStream( htmlCode1.getBytes("UTF-8") ) ); + } + + // System.out.println( "HTML CODE IS : " + htmlCode1 ); return SUCCESS; } === modified file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java' --- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java 2011-04-27 17:15:13 +0000 +++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateDataStatusResultAction.java 2011-05-24 08:25:51 +0000 @@ -5,11 +5,9 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.UUID; import org.hibernate.SessionFactory; @@ -434,7 +432,8 @@ } } - Set dSetSource = selDataSet.getSources(); + //Set dSetSource = selDataSet.getSources(); + List dSetSource = new ArrayList( selDataSet.getSources()); orgUnitInfo = "-1"; Iterator ouIt = orgUnitList.iterator(); while ( ouIt.hasNext() ) @@ -494,9 +493,10 @@ Iterator orgUnitListIterator = orgUnitList.iterator(); OrganisationUnit o; - Set dso = new HashSet(); + //Set dso = new HashSet(); + List dso = new ArrayList( selDataSet.getSources()); Iterator periodIterator; - dso = selDataSet.getSources(); + //dso = selDataSet.getSources(); while ( orgUnitListIterator.hasNext() ) { @@ -508,7 +508,15 @@ if ( minOULevel > organisationUnitService.getLevelOfOrganisationUnit( o ) ) minOULevel = organisationUnitService.getLevelOfOrganisationUnit( o ); - +/* + List childOrgUnits = new ArrayList(); + + if ( !dso.contains( o ) ) + { + childOrgUnits = filterChildOrgUnitsByDataSet( o, dso ); + } + System.out.println( "Size of Child OrgUnit: " + childOrgUnits.size() ); +*/ periodIterator = periodList.iterator(); Period p; @@ -531,51 +539,63 @@ } else if ( !dso.contains( o ) ) { - orgUnitInfo = "-1"; - orgUnitCount = 0; - getOrgUnitInfo( o, dso ); - - if ( includeZeros == null ) - { - query = "SELECT COUNT(*) FROM " + dataViewName + " WHERE dataelementid IN (" + deInfo - + ") AND sourceid IN (" + orgUnitInfo + ") AND periodid IN (" + periodInfo - + ") and value <> 0"; - - } - else - { - query = "SELECT COUNT(*) FROM " + dataViewName + " WHERE dataelementid IN (" + deInfo - + ") AND sourceid IN (" + orgUnitInfo + ") AND periodid IN (" + periodInfo + ")"; - } - - System.out.println("Used Query is :::::::" + query ); - SqlRowSet sqlResultSet = jdbcTemplate.queryForRowSet( query ); - - if ( sqlResultSet.next() ) - { - try + System.out.println("Dataset : " + selDataSet.getName() + " not assign to " + o.getName() ); + /* + if( childOrgUnits == null || childOrgUnits.size() <= 0 ) + { + dsResults.add( -2 ); + continue; + } + + else*/ + //{ + /*orgUnitInfo = "-1"; + orgUnitCount = 0; + getOrgUnitInfo( o, dso ); + + if ( includeZeros == null ) { - //System.out.println( "Result is : \t" + sqlResultSet.getLong( 1 ) ); - dataStatusPercentatge = ((double) sqlResultSet.getInt( 1 ) / (double) (dataSetMemberCount1 * orgUnitCount)) * 100.0; + query = "SELECT COUNT(*) FROM " + dataViewName + " WHERE dataelementid IN (" + deInfo + + ") AND sourceid IN (" + orgUnitInfo + ") AND periodid IN (" + periodInfo + + ") and value <> 0"; } - catch ( Exception e ) - { + else + { + query = "SELECT COUNT(*) FROM " + dataViewName + " WHERE dataelementid IN (" + deInfo + + ") AND sourceid IN (" + orgUnitInfo + ") AND periodid IN (" + periodInfo + ")"; + } + + System.out.println("Used Query is :::::::" + query ); + SqlRowSet sqlResultSet = jdbcTemplate.queryForRowSet( query ); + + if ( sqlResultSet.next() ) + { + try + { + //System.out.println( "Result is : \t" + sqlResultSet.getLong( 1 ) ); + dataStatusPercentatge = ((double) sqlResultSet.getInt( 1 ) / (double) (dataSetMemberCount1 * orgUnitCount)) * 100.0; + + } + catch ( Exception e ) + { + dataStatusPercentatge = 0.0; + } + } + else dataStatusPercentatge = 0.0; - } - } - else - dataStatusPercentatge = 0.0; - - if ( dataStatusPercentatge > 100.0 ) - dataStatusPercentatge = 100; - - dataStatusPercentatge = Math.round( dataStatusPercentatge * Math.pow( 10, 0 ) ) / Math.pow( 10, 0 ); - - dsResults.add( (int) dataStatusPercentatge ); - //dataElementCount = sqlResultSet.getInt( 1 ); - deCounts.add( -1 ); - continue; + + if ( dataStatusPercentatge > 100.0 ) + dataStatusPercentatge = 100; + + dataStatusPercentatge = Math.round( dataStatusPercentatge * Math.pow( 10, 0 ) ) / Math.pow( 10, 0 ); + */ + //dsResults.add( (int) dataStatusPercentatge ); + dsResults.add( -1 ); + //dataElementCount = sqlResultSet.getInt( 1 ); + deCounts.add( -1 ); + continue; + //} } orgUnitInfo = "" + o.getId(); @@ -669,7 +689,7 @@ return SUCCESS; } - public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, Set dso ) + public void getDataSetAssignedOrgUnitCount( OrganisationUnit organisationUnit, List dso ) { Collection children = organisationUnit.getChildren(); @@ -696,7 +716,7 @@ try { @SuppressWarnings("unused") - int sqlResult = jdbcTemplate.update( query ); + int sqlResult = jdbcTemplate.update( query ); System.out.println( "View " + dataViewName + " dropped Successfully (if exists) " ); @@ -787,8 +807,8 @@ getOrgUnitInfo( child ); } } - - private void getOrgUnitInfo( OrganisationUnit organisationUnit, Set dso ) +/* + private void getOrgUnitInfo( OrganisationUnit organisationUnit, List dso ) { Collection children = organisationUnit.getChildren(); @@ -805,7 +825,7 @@ getOrgUnitInfo( child, dso ); } } - +*/ private String getDEInfo( Collection dataElements ) { StringBuffer deInfo = new StringBuffer( "-1" ); @@ -816,5 +836,12 @@ } return deInfo.toString(); } - +/* + private List filterChildOrgUnitsByDataSet( OrganisationUnit selectedOrganisationUnit, List dso ) + { + List filteredOrganisationUnits = new ArrayList( organisationUnitService.getOrganisationUnitWithChildren( selectedOrganisationUnit.getId() ) ); + filteredOrganisationUnits.retainAll( dso ); + return filteredOrganisationUnits; + } +*/ }// class end === added file 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateNullReportResultAction.java' --- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateNullReportResultAction.java 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dataanalyser/ds/action/GenerateNullReportResultAction.java 2011-05-24 08:25:51 +0000 @@ -0,0 +1,370 @@ +package org.hisp.dhis.dataanalyser.ds.action; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.hibernate.SessionFactory; +import org.hisp.dhis.dataelement.DataElement; +import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; +import org.hisp.dhis.dataelement.DataElementService; +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.organisationunit.OrganisationUnitService; +import org.hisp.dhis.period.Period; +import org.hisp.dhis.period.PeriodService; +import org.hisp.dhis.period.PeriodType; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.support.rowset.SqlRowSet; + +import com.opensymphony.xwork2.Action; + +public class GenerateNullReportResultAction implements Action +{ + + // --------------------------------------------------------------- + // Dependencies + // --------------------------------------------------------------- + + private PeriodService periodService; + + public void setPeriodService( PeriodService periodService ) + { + this.periodService = periodService; + } + + private OrganisationUnitService organisationUnitService; + + public void setOrganisationUnitService( OrganisationUnitService organisationUnitService ) + { + this.organisationUnitService = organisationUnitService; + } + + private DataSetService dataSetService; + + public void setDataSetService( DataSetService dataSetService ) + { + this.dataSetService = dataSetService; + } + + private DataElementService dataElementService; + + public void setDataElementService( DataElementService dataElementService ) + { + this.dataElementService = dataElementService; + } + + private JdbcTemplate jdbcTemplate; + + public void setJdbcTemplate( JdbcTemplate jdbcTemplate ) + { + this.jdbcTemplate = jdbcTemplate; + } + + @SuppressWarnings( "unused" ) + private SessionFactory sessionFactory; + + public void setSessionFactory( SessionFactory sessionFactory ) + { + this.sessionFactory = sessionFactory; + } + // --------------------------------------------------------------- + // Input Parameters + // --------------------------------------------------------------- + + private String dsId; + + public void setDsId( String dsId ) + { + this.dsId = dsId; + } + + private String includeZeros; + + public void setIncludeZeros( String includeZeros ) + { + this.includeZeros = includeZeros; + } + + public String getIncludeZeros() + { + return includeZeros; + } + + private int periodId; + + public void setPeriodId( int periodId ) + { + this.periodId = periodId; + } + + private String ouId; + + public void setOuId( String ouId ) + { + this.ouId = ouId; + } + + String dataElementInfo; + + private Map deMapForName; + + + public Map getDeMapForName() + { + return deMapForName; + } + + private Map deMapForValue; + + public Map getDeMapForValue() + { + return deMapForValue; + } + + private List deFinalList; + + public List getDeFinalList() + { + return deFinalList; + } + + private String dataSetName; + + public String getDataSetName() + { + return dataSetName; + } + + private int dataElementCount; + + public int getDataElementCount() + { + return dataElementCount; + } + + private int nullValuDeCount; + + public int getNullValuDeCount() + { + return nullValuDeCount; + } + + private int zeroValueDeCount; + + public int getZeroValueDeCount() + { + return zeroValueDeCount; + } + + private int notZeroValueDeCount; + + public int getNotZeroValueDeCount() + { + return notZeroValueDeCount; + } + + private String orgUnitName; + + public String getOrgUnitName() + { + return orgUnitName; + } + + private String periodName; + + public String getPeriodName() + { + return periodName; + } + + // --------------------------------------------------------------- + // Action Implementation + // --------------------------------------------------------------- + + + + public String execute() throws Exception + { + + deMapForName = new HashMap(); + deMapForValue = new HashMap(); + deFinalList = new ArrayList(); + + // Period Related Info + Period period = periodService.getPeriod( periodId ); + + // orgUnit Related Info + OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( ouId ) ); + orgUnitName = orgUnit.getName(); + + // DataSet Related Info + DataSet dataSet = dataSetService.getDataSet( Integer.parseInt( dsId ) ); + dataSetName = dataSet.getName(); + + PeriodType dataSetPeriodType = dataSet.getPeriodType(); + + periodName = getPeriodNameByPeriodType( dataSetPeriodType , period ); + + List dataElementList = new ArrayList( dataSet.getDataElements() ); + + + System.out.println( "Period : " + periodName + ", OrgUnit Name : " + orgUnit.getName() + ", Data Set Name: " + dataSet.getName() ); + + System.out.println( "dataSet Period Type : " + dataSetPeriodType.getName() + ", OrgUnit Name : " + orgUnit.getName() + ", dataElement List : " + dataElementList.size() ); + + // dataElement related Information + + dataElementInfo = "-1"; + List deList = new ArrayList(); + for ( DataElement dataElement : dataElementList ) + { + DataElement de1 = dataElementService.getDataElement( dataElement.getId() ); + deList.add( de1 ); + + dataElementInfo += "," + de1.getId(); + //StringBuffer deInfo = new StringBuffer( "-1" ); + //deInfo.append( "," ).append( dataElement.getId() ); + //deInfo.toString(); + } + + //String query = "SELECT datavalue.value ,dataelement.name ,dataelementcategoryoption.name FROM datavalue ,dataelement,dataelementcategoryoption where datavalue.dataelementid = " + dataElement.getId() + " AND datavalue.periodid = " + period.getId() + " AND datavalue.sourceid = " + orgUnit.getId() + " AND datavalue.dataelementid = dataelement.dataelementid AND datavalue.categoryoptioncomboid = dataelementcategoryoption.categoryoptionid"; + + String query = "SELECT datavalue.value, datavalue.dataelementid ,dataelement.name , categoryoptioncomboid from datavalue INNER JOIN dataelement ON datavalue.dataelementid = dataelement.dataelementid where datavalue.dataelementid in (" + dataElementInfo + ") and datavalue.periodid = " + period.getId() + " and datavalue.sourceid = " + orgUnit.getId(); + + + SqlRowSet rs = jdbcTemplate.queryForRowSet( query ); + + //List tempList = new ArrayList(); + + List zeroValueDeList = new ArrayList(); + List notZeroValueDeList = new ArrayList(); + List nullValueDeList = new ArrayList(); + int count1 = 0; + int count2 = 0; + while ( rs.next() ) + { + String deValue = rs.getString( 1 ); + //Double deValue = rs.getDouble( 1 ); + Integer dataElementId = rs.getInt( 2 ); + //String dataElementName = rs.getString( 3 ); + Integer categoryoptioncomboid = rs.getInt( 4 ); + + String deAndOptionCombo = ""; + + if( deValue.equals("0") ) + { + //DataElement tempDE = dataElementService.getDataElement( dataElementId ); + //DataElementCategoryCombo dataElementCategoryCombo = tempDE.getCategoryCombo(); + deAndOptionCombo = dataElementId + ":" + categoryoptioncomboid; + zeroValueDeList.add( deAndOptionCombo ); + deMapForValue.put( deAndOptionCombo, deValue ); + count1++; + } + else + { + deAndOptionCombo = dataElementId + ":" + categoryoptioncomboid; + notZeroValueDeList.add( deAndOptionCombo ); + //deMapForName.put( deAndOptionCombo, dataElementName ); + //deMapForValue.put( deAndOptionCombo, deValue.toString() ); + deMapForValue.put( deAndOptionCombo, deValue ); + count2++; + } + + //deMapForValue.put( deAndOptionCombo, deValue ); + + } + System.out.println( "Zero Loop count: " + count1 + ", Not Zero loop count : " + count2 ); + for( DataElement dataElement : dataElementList ) + { + List decocList = new ArrayList(dataElement.getCategoryCombo().getOptionCombos() ); + String deAndOptionCombo = ""; + for( DataElementCategoryOptionCombo deCom : decocList ) + { + if( !(zeroValueDeList.contains( dataElement.getId() + ":" + deCom.getId()) || notZeroValueDeList.contains( dataElement.getId() + ":" + deCom.getId())) ) + { + deAndOptionCombo = dataElement.getId() + ":" + deCom.getId(); + nullValueDeList.add( deAndOptionCombo ); + } + + deMapForName.put( dataElement.getId() + ":" + deCom.getId(), dataElement.getName()+ " - " + deCom.getName() ); + } + + /* + if( !(zeroValueDeList.contains( dataElement) || notZeroValueDeList.contains( dataElement )) ) + { + DataElementCategoryCombo dataElementCategoryCombo = dataElement.getCategoryCombo(); + String deAndOptionCombo = dataElement.getId() + ":" + dataElementCategoryCombo.getId(); + nullValueDeList.add( deAndOptionCombo ); + } + //deMapForName.put( deAndOptionCombo, dataElement.getName() ); + */ + + } + deFinalList.addAll( nullValueDeList ); + deFinalList.addAll( zeroValueDeList ); + deFinalList.addAll( notZeroValueDeList ); + + dataElementCount = deFinalList.size(); + nullValuDeCount = nullValueDeList.size(); + zeroValueDeCount = zeroValueDeList.size(); + notZeroValueDeCount = notZeroValueDeList.size(); + + System.out.println( "Null value dataElement List : " + nullValueDeList.size() + ",Zero Value dataElement List : " + zeroValueDeList.size() + ", Valued dataElement List : " + notZeroValueDeList.size() ); + System.out.println( "Final dataElement List : " + deFinalList.size() ); + return SUCCESS; + } + + // Method for getting perion name when periodType is known + public String getPeriodNameByPeriodType( PeriodType periodType, Period period ) + { + SimpleDateFormat simpleDateFormat1; + + SimpleDateFormat simpleDateFormat2; + + String periodName = ""; + + if ( periodType.getName().equalsIgnoreCase( "monthly" ) ) + { + simpleDateFormat1 = new SimpleDateFormat( "MMM-yyyy" ); + periodName = simpleDateFormat1.format( period.getStartDate() ) ; + } + else if ( periodType.getName().equalsIgnoreCase( "quarterly" ) ) + { + simpleDateFormat1 = new SimpleDateFormat( "MMM" ); + simpleDateFormat2 = new SimpleDateFormat( "MMM-yyyy" ); + + periodName = simpleDateFormat1.format( period.getStartDate() ) + " - " + simpleDateFormat2.format( period.getEndDate() ); + } + else if ( periodType.getName().equalsIgnoreCase( "yearly" ) ) + { + simpleDateFormat1 = new SimpleDateFormat( "yyyy" ); + int year; + + year = Integer.parseInt( simpleDateFormat1.format( period.getStartDate() ) ) + 1; + + periodName = simpleDateFormat1.format( period.getStartDate() ) + "-" + year ; + + } + else if( periodType.getName().equalsIgnoreCase( "daily" ) ) + { + simpleDateFormat1 = new SimpleDateFormat( "yyyy-MM-dd" ); + + periodName = simpleDateFormat1.format( period.getStartDate() ); + + } + else + { + simpleDateFormat1 = new SimpleDateFormat( "yyyy-MM-dd" ); + + periodName = simpleDateFormat1.format( period.getStartDate() ) + " - " + simpleDateFormat1.format( period.getEndDate() ); + } + + return periodName; + } + + +} === modified file 'local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml' --- local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml 2011-05-18 11:12:17 +0000 +++ local/in/dhis-web-dashboard/src/main/resources/META-INF/dhis/beans.xml 2011-05-24 08:25:51 +0000 @@ -587,6 +587,30 @@ + + + + + + + + + + + + + + + + + + + + + + /main.vm /dhis-web-dashboard/dataStatusFront.vm /dhis-web-dashboard/menuWithTreeForDS.vm - - ../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/ds.js,javascript/db.js,javascript/date.js,javascript/hashtable.js + ../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/ds.js,javascript/db.js,javascript/date.js,javascript/hashtable.js css/StylesForTags.css + /popup.vm + /dhis-web-dashboard/dataStatusResult.vm + javascript/ds.js,javascript/hashtable.js + css/StylesForTags.css + + + + + /content.vm + /dhis-web-dashboard/nullReportDataEntryStatusResult.vm + javascript/ds.js,javascript/hashtable.js + css/StylesForTags.css + - - /dhis-web-dashboard/dataStatusResult.vm - - javascript/ds.js,javascript/hashtable.js - css/StylesForTags.css - + + + $periodname #end #end - + #foreach($chiildorgUnit in $orgUnitList) #set( $count1 = $minOULevel ) #set( $curOrgUnitLevel = $organisationUnitService.getLevelOfOrganisationUnit( $chiildorgUnit ) ) @@ -118,7 +118,7 @@ #end - + === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm 2011-04-15 11:35:33 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/dataStatusResult.vm 2011-05-24 08:25:51 +0000 @@ -1,9 +1,10 @@ - DataStatus Result - - + + function getNullReportInfo( dsId, periodId, selOrgUnit ) + { + var url = "nullReportResult.action?dsId="+dsId+"&periodId="+periodId+"&ouId="+selOrgUnit; + $('#contentDataRecord').dialog('destroy').remove(); + $('
' ).load(url).dialog({ + title: 'Null Report', + maximize: true, + closable: true, + modal:true, + overlay:{background:'#000000', opacity:0.1}, + width: 800, + height: 600 + }); + } + + @@ -61,6 +77,10 @@    Not Entered ( 0 ) % + +   +  Not Assigned +
@@ -92,19 +112,21 @@ #set( $dsresultList = $ouMapDataStatusResult.get( $chiildorgUnit ) ) #set( $dataElementCounts = $ouMapDataElementCount.get( $chiildorgUnit ) ) + #set( $periodCounts = $periodList ) #set( $count2 = 0 ) #foreach( $result in $dsresultList ) #set( $deCount = $dataElementCounts.get( $count2 ) ) + #set( $periodCount = $periodCounts.get( $count2 ) ) #if( $result < 0 )   #elseif( $result == 0 ) - $result% #if( $deCount != -1 ) ( $deCount ) #end + $result% #if( $deCount != -1 ) ( $deCount ) #end #elseif( $result > 75 ) - $result% #if( $deCount != -1 ) ( $deCount ) #end + $result% #if( $deCount != -1 ) ( $deCount ) #end #elseif( $result > 40 && $result <= 75 ) - $result% #if( $deCount != -1 ) ( $deCount ) #end + $result% #if( $deCount != -1 ) ( $deCount ) #end #else - $result% #if( $deCount != -1 ) ( $deCount ) #end + $result% #if( $deCount != -1 ) ( $deCount ) #end #end #set( $count2 = $count2 + 1 ) #end === modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js 2011-05-18 11:12:17 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/javascript/ds.js 2011-05-24 08:25:51 +0000 @@ -527,4 +527,22 @@ }); } +// Null Report for Data Entry Status + +//function getNullReportInfo( dsId, periodId, selOrgUnit ) +//{ + //alert("jjjjjjjjjjjj"); +/*var url = "nullReportResult.action?dsId="+dsId+"&periodId="+periodId+"&ouId="+selOrgUnit; + $('#contentDataRecord').dialog('destroy').remove(); + $('
' ).load(url).dialog({ + title: 'Null Report', + maximize: true, + closable: true, + modal:true, + overlay:{background:'#000000', opacity:0.1}, + width: 800, + height: 400 + });*/ +//} + //evt.target.href = "nullReportResult.action?dsId="+dsId+"&periodId="+periodId+"&ouId="+selOrgUnit; === added file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/nullReportDataEntryStatusResult.vm' --- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/nullReportDataEntryStatusResult.vm 1970-01-01 00:00:00 +0000 +++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/nullReportDataEntryStatusResult.vm 2011-05-24 08:25:51 +0000 @@ -0,0 +1,68 @@ + + + +
+ +
+ +
+
+
Data Entry Status
+
+ + + + + + + + + + + + + +
  Value Not Entered
  Zero value Entered
  Value Entered
+
+ +
+
DataSet Name : $dataSetName ( Total DataElement : $dataElementCount ,Null : $nullValuDeCount , Fill with Zero : $zeroValueDeCount , Fill with some Value: $notZeroValueDeCount )
+
+
OrganisationUnit Name : $orgUnitName For the Period : $periodName
+
+ + + + + + + + #set( $count1 = 1 ) + #foreach( $dataElement in $deFinalList ) + #set( $dataElementName = $deMapForName.get( $dataElement ) ) + #set( $dataElementValue = $deMapForValue.get( $dataElement ) ) + + + + + #if( !$dataElementValue ) + + #elseif( $dataElementValue == "0" ) + + #else + + #end + #set( $count1 = $count1 + 1 ) + + #end +
Sl.NoData Element NamesValue
$count1$dataElementName $dataElementValue$dataElementValue
+
+