← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2265: Bug Fixed in Dashboard/Graphical Analyis/Regular

 

------------------------------------------------------------
revno: 2265
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-09-28 16:38:55 +0530
message:
  Bug Fixed in Dashboard/Graphical Analyis/Regular 
modified:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/ExportToExcelAction.java
  local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm


--
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-dashboard/src/main/java/org/hisp/dhis/dashboard/action/ExportToExcelAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/ExportToExcelAction.java	2010-09-28 07:10:26 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/action/ExportToExcelAction.java	2010-09-28 11:08:55 +0000
@@ -165,8 +165,8 @@
         String outputReportFile = System.getenv( "DHIS2_HOME" ) + File.separator + configurationService.getConfigurationByKey( Configuration_IN.KEY_REPORTFOLDER ).getValue()
           + File.separator + "output" + File.separator + UUID.randomUUID().toString() + ".xls";
        
-        System.out.println("Env Variable is  :" + System.getenv( "DHIS2_HOME" ) );
-        System.out.println("Complete path is :" + outputReportFile );
+       // System.out.println("Env Variable is  :" + System.getenv( "DHIS2_HOME" ) );
+       // System.out.println("Complete path is :" + outputReportFile );
         
         WritableWorkbook outputReportWorkbook = Workbook.createWorkbook( new File(outputReportFile) );
         WritableSheet sheet0 = outputReportWorkbook.createSheet( "ChartOutput", 0 );

=== modified file 'local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm'
--- local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm	2010-09-23 13:16:55 +0000
+++ local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/graphicalAnalysisResult.vm	2010-09-28 11:08:55 +0000
@@ -110,6 +110,8 @@
     document.getElementById("headingInfoId").innerHTML = document.getElementById("testId").value; 	    	
 }
 
+//fucction for selected Button is ViewChart
+
 function exportToExcelFunction1( summaryOption )
 {
 	var chartDisplayOptionList = document.getElementById("chartDisplayOption");
@@ -126,6 +128,21 @@
 				return true;				
 			}
 	
+//fucction for selected Button is ViewSummary
+
+function exportToExcelFunction2( summaryOption )
+{
+    var chartDisplayOptionList = document.getElementById("chartDisplayOption");
+    var chartDisplayOptionValue = chartDisplayOptionList.options[ chartDisplayOptionList.selectedIndex ].value;
+    
+    document.getElementById("exportExcelAnchor2").href="exportToExcel.action?viewSummary="+summaryOption+"&chartDisplayOption="+chartDisplayOptionValue;
+
+}
+
+
+
+
+
 </script>
 
 <script>
@@ -340,7 +357,8 @@
     <div align="right">
         
         #if($selectedButton.equals("ViewSummary"))
-			            <a href="exportToExcel.action?viewSummary=yes" target="_blank">Export To WorkBook</a>
+			       <!--     <a href="exportToExcel.action?viewSummary=yes" target="_blank">Export To WorkBook</a> -->
+			       <a id="exportExcelAnchor2" name="exportExcelAnchor2" href="#" onclick="javascript:exportToExcelFunction2('yes')" target="_blank">Export To WorkBook</a>
 			            			        	&nbsp;&nbsp;
 			        	<select id="chartDisplayOption" name="chartDisplayOption" onchange="getSortedListForSummary()">
 			        		<option value="none">Select Sort Type</option>