← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 716: update report excel

 

------------------------------------------------------------
revno: 716
committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
branch nick: trunk
timestamp: Tue 2009-09-15 11:10:48 +0700
message:
  update report excel
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importData.vm
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reports.js
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menuWithTree.vm
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.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 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java	2009-09-15 04:00:03 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reportexcel/ReportExcel.java	2009-09-15 04:10:48 +0000
@@ -75,10 +75,32 @@
         this.group = group;
     }
 
+    public boolean isCategory()
+    {
+        return this.getReportType().equalsIgnoreCase( TYPE.CATEGORY );
+    }
+
+    public boolean isOrganisationUnitGroupListing()
+    {
+        return this.getReportType().equalsIgnoreCase( TYPE.ORGANIZATION_GROUP_LISTING );
+    }
+    
+    public boolean isPeriodColumnListing()
+    {
+        return this.getReportType().equalsIgnoreCase( TYPE.PERIOD_COLUMN_LISTING );
+    }
+    
+    public boolean isNormal()
+    {
+        return this.getReportType().equalsIgnoreCase( TYPE.NORMAL );
+    }
+    
+
     // ----------------------------------------------------------------------
     // hashCode and equals
     // ----------------------------------------------------------------------
 
+
     @Override
     public int hashCode()
     {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2009-09-07 07:56:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js	2009-09-15 04:10:48 +0000
@@ -404,7 +404,9 @@
 {
 	var divEffect = document.getElementById( 'divEffect' );
 	
-	document.body.removeChild(divEffect);
+	if(divEffect!=null){	
+		document.body.removeChild(divEffect);
+	}
 }
 
 /**

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importData.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importData.vm	2009-09-15 04:00:03 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/importData.vm	2009-09-15 04:10:48 +0000
@@ -4,7 +4,7 @@
  <span id="message" style="top:70px;right:5px;position:fixed;width:200px;z-index:100009" onclick="hideById(this.id);"></span>
 
 <!-- <input type="hidden" name="uploadFileName" id="uploadFileName" value="$!fileExcel">-->
-<input type="hidden" name="uploadFileName" id="uploadFileName" value="E:\data\Bieu 1 - TX.xls" >
+<input type="hidden" name="uploadFileName" id="uploadFileName" value="E:\data\Bieu 1 - TX.xls">
  #end
 <h2>$!encoder.htmlEncode($!organisationUnit.name)</h2>
 <table width="50%">
@@ -18,8 +18,7 @@
   </tr>
   <tr>
     <td>$i18n.getString( 'template_excel_file' )</td>
-    <td><select type="text" id="reportId" name="reportId" style="min-width:20em; width:100%" #if(!$!fileExcel) disabled #end onChange="javascript: document.getElementById('lastYear').disabled=false; document.getElementById('nextYear').disabled=false; document.getElementById('periodId').disabled=false; document.getElementById('preview').disabled=false; document.getElementById('import').disabled=false;">
-	  <option value="">$i18n.getString('select')</option>
+    <td><select type="text" id="reportId" name="reportId" style="min-width:20em; width:100%">
 	  #foreach($reportExcel in $reportExcels)
 		<option value="$!reportExcel.id">$!encoder.htmlEncode($!reportExcel.name)</option>
 	  #end
@@ -29,9 +28,8 @@
   <tr>
     <td>$i18n.getString( 'period' )</td>
     <td>
-	<input type="button" value="<<" id="lastYear" name="lastYear" onclick="lastYear();" disabled />
-	<input type="button" value=">>" id="nextYear" name="nextYear" onclick="nextYear()" disabled />
-	<select name="periodId" id="periodId" style="min-width:20em; width:100%" type="text" disabled >
+	<input type="button" value="<<" onclick="lastYear();" #if(!$organisationUnit) disabled #end/><input type="button" value=">>" #if(!$organisationUnit) disabled #end onclick="nextYear()"/>
+	<select name="periodId" id="periodId" style="min-width:20em; width:100%" type="text">
         	#foreach($period in $periods)
 				<option value='$period.id'>$format.formatPeriod( $period )</option>
 			#end
@@ -45,20 +43,8 @@
   
 </table>
 <hr>
-<input type="button" name="preview" id="preview" onClick="javascript: getPreviewImportData();" value="$i18n.getString('preview')" disabled>
-<input type="button" name="import" id="import" onClick="javascript: importData();" value="$i18n.getString('import')" disabled>
-<br><br>
-	<div id="showValue" style="display:none; width:100%" >
-		<table id="showReportItemValues" width="100%">
-		<tr>
-		<th width="20px"><input type="checkbox" name="selectAll" id="selectAll" onClick="javascript: selectAll();"/></th>
-		<th>$i18n.getString('report')</th>
-		<th>$i18n.getString('value')</th>
-		</tr>
-		<tbody>
-		
-		</tbody>
-		</table>
-	</div>
+<input type="button" name="import" id="import" onClick="javascript: importData();" value="$i18n.getString('import')">
+
+
 </body>
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js	2009-09-14 15:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reportItem.js	2009-09-15 04:10:48 +0000
@@ -151,6 +151,9 @@
 	}
 }
 
+/*
+*	COPY REPORT ITEM 
+*/
 function copySelectedItem(){
 	$.post("getAllReportExcels.action",{},
 	function (xmlObject){
@@ -185,57 +188,20 @@
 	},'xml');		
 }
 
-
-/**
-* Calculation ReportItem type
-*/
-function openCalculationExpression( reportId ){	
-	$("#formulaCalculation").html($("#expression").val());
-	$.get("getReportItems.action",
-	{reportId:reportId},
-	function (data){
-		var xmlObject = data.getElementsByTagName('reportItems')[0];		
-		var availableReportItemList = byId( "availableReportItems" );		
-		availableReportItemList.options.length = 0;
-		
-		var reportItems = xmlObject.getElementsByTagName( "reportItem" );
-		
-		for ( var i = 0; i < reportItems.length; i++)
-		{		
-			var name = reportItems[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
-			var row = reportItems[ i ].getElementsByTagName( "row" )[0].firstChild.nodeValue;
-			var column = reportItems[ i ].getElementsByTagName( "column" )[0].firstChild.nodeValue;
-			
-			var option = document.createElement( "option" );
-			option.value = "[" + row + "." + column + "]";
-			option.text = name;
-			availableReportItemList.add( option, null );	
-		}		
-		setPositionCenter( 'calculation' );	
-		$("#calculation").show();
-	},
-	'xml');	
-}
-
-function insertCalculation(){
-	$("#formulaCalculation").html($("#formulaCalculation").html() + $("#availableReportItems").val());
-}
-
 /**
 * DataElement Report type
 */
 function openDataElementExpression(){
 	$("#formula").html($("#expression").val());
-	getDataElementGroups();
-	filterDataElements();
+	getALLDataElementGroup();
+	getDataElementsByGroup();
 	$("#dataElementGroup").attr("disabled", false);
 	$("#availableDataElements").attr("disabled", false);
-	$("#availableDataElements").change(getOptionCombos);	
-	setPositionCenter( 'normal' );	
-	$("#normal").show();
+	$("#availableDataElements").change(getOptionCombos);		
+	$("#normal").showAtCenter( true );
 }
 
-function getDataElementGroups(){
+function getALLDataElementGroup(){
 	var list = byId('dataElementGroup');
 	list.options.length = 0;
 	list.add( new Option( "ALL", "ALL" ), null );
@@ -245,30 +211,35 @@
 	}
 }
 
-function filterDataElements( )
+function getDataElementsByGroup( )
 {		
 	var dataElementGroupId = $("#dataElementGroup").val();
-	$.get("getFilteredDataElements.action",{dataElementGroupId:dataElementGroupId},
-	function(xmlObject){
-		var xmlObject = xmlObject.getElementsByTagName('dataelements')[0];
-		var dataElementList = byId( "availableDataElements" );
-			
-		dataElementList.options.length = 0;
-		
-		var dataelements = xmlObject.getElementsByTagName( "dataelement" );
-		
-		for ( var i = 0; i < dataelements.length; i++)
-		{
-			var id = dataelements[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
-			var elementName = dataelements[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
-			
-			var option = document.createElement( "option" );
-			option.value = id ;
-			option.text = elementName;
-			dataElementList.add( option, null );	
-		}
+	var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + $("#dataElementGroup").val();
+	
+	var request = new Request();
+    request.setResponseTypeXML( 'xmlObject' );
+    request.setCallbackSuccess( getDataElementsByGroupCompleted );
+	request.send( url );	
+}
+
+function getDataElementsByGroupCompleted( xmlObject ){
+
+	var dataElementList = byId( "availableDataElements" );
+		
+	dataElementList.options.length = 0;
+	
+	var dataelements = xmlObject.getElementsByTagName( "dataElement" );
+	
+	for ( var i = 0; i < dataelements.length; i++)
+	{
+		var id = dataelements[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
+		var elementName = dataelements[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;
+		
+		var option = document.createElement( "option" );
+		option.value = id ;
+		option.text = elementName;
+		dataElementList.add( option, null );	
 	}
-	,'xml');	
 }
 
 function getOptionCombos(){
@@ -412,3 +383,9 @@
 	var dataElementComboId = "[*." + $("#optionCombos_").val() + "]";
 	$("#categoryFormula").html($("#categoryFormula").html() + dataElementComboId);
 }
+
+/*
+* Organisation Unit Listing Report
+*/
+
+

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reports.js'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reports.js	2009-09-14 15:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/reports.js	2009-09-15 04:10:48 +0000
@@ -201,7 +201,7 @@
 }
 
 /*
-* Update Data Element Group Order
+*   Update Data Element Group Order
 */
 
 function updateDataElementGroupOrder(){
@@ -214,103 +214,19 @@
 	window.location = url;
 }
 
-
-function getDataElementOrderById(){
-	var url = "getDataElementOrder.action?id=" + $("#availableDataElementGroups").val();
-	var request = new Request();
-	request.setResponseTypeXML( 'datalement' );
-	request.setCallbackSuccess( getDataElementGroupByIdReceived );
-	request.send( url );	
-}
-
-function getDataElementGroupByIdReceived( datalement ){
-	var html = "";
-	var dataelEments = datalement.getElementsByTagName( "dataElement" );	
-	for ( var i = 0; i < dataelEments.length; i++ )
-    {
-		
-        var id = dataelEments[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
-        var name = dataelEments[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;       
-		html += "<li class='ui-state-default' name='dataElement' value='"+id+"'><span class='ui-icon ui-icon-arrowthick-2-n-s'></span>" + name + "</li>";
-    }
-
-	$("#sortable1").html(html);	
-}
-
-
-
-
-
-
-function updateOrgUnitByReport(){
-	
-	var list = document.getElementById('selectedGroups').options;
-	var selectedGroups = '';	
-	for(var i=0; i< list.length; i++){
-		selectedGroups = selectedGroups + "&selectedGroups=" + ( list[i].value );
-	}
-	
-	var  id = document.getElementById('orgUnitId').value;
-	
-	var url = 'updateReportExcelGroupListing.action?id='+id + selectedGroups;	
-	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.send(url);	
-}
-
-
-function updateReport(){
-	var id = getFieldValue("id");	
-	var excel = getFieldValue("excelTemplateFile");
-	var reportType = getFieldValue("reportType");
-	var periodRow = getFieldValue("periodRow");
-	var periodCol = getFieldValue("periodColumn");
-	var organsationRow = getFieldValue("organisationRow");
-	var organsationCol = getFieldValue("organisationColumn");
-	var group = $("#group").val();
-	
-	var request = new Request();
-    request.setResponseTypeXML( 'xmlObject' );
-    request.setCallbackSuccess( addReportCompleted );
-	var url = 'updateReportExcelForm.action?id=' + id;
-	url += "&reportType=" + reportType;
-	url += "&periodRow=" + periodRow;
-	url += "&periodCol=" + periodCol;
-	url += "&organisationRow=" + organsationRow;
-	url += "&organisationCol=" + organsationCol;
-	url += "&excel=" + excel;
-	url += "&group=" + group;
-    request.send( url );
-}
-
-function addReportCompleted( xmlObject ){	
-	window.location.reload();
-}
-
-
-
-function getDataElementByGroup( id ){
-
-	var url = "../dhis-web-commons-ajax/getDataElements.action?id=" + id;
-
-	var request = new Request();
-	request.setResponseTypeXML( 'datalement' );
-	request.setCallbackSuccess( getDataElementByGroupReceived );
-	request.send( url );	
-}
-
-function getDataElementByGroupReceived( datalement ){
-	var dataelEments = xmlObject.getElementsByTagName( "dataElement" );
-	for ( var i = 0; i < dataelEments.length; i++ )
-    {
-        var id = dataelEments[ i ].getElementsByTagName( "id" )[0].firstChild.nodeValue;
-        var name = indicators[ i ].getElementsByTagName( "name" )[0].firstChild.nodeValue;            
-    }
-}
-function getHeader(){
-	//var html = "table
-}
+//===============================================
+//  REPORT EXCEL ORGANISATION UNIT LISTING
+//===============================================
+
+/*
+*   Update Data Element Group Order
+*/
+
+
+
+
+
+
 
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm	2009-09-15 04:00:03 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menu.vm	2009-09-15 04:10:48 +0000
@@ -5,7 +5,7 @@
 <h2>$i18n.getString( "generate_report" )</h2>
 <ul>
 	<li><a href="selectReportParamerter.action">$i18n.getString( "generate_report" )&nbsp;</a></li>	
-	<li><a href="getInformation.action">$i18n.getString( "import_excel_file_manager" )&nbsp;</a></li>	
+	<li><a href="getExcelFileByOrganisationUnit.action">$i18n.getString( "import_excel_file_manager" )&nbsp;</a></li>	
 	<li><a href="selectDataSetCompletedReport.action">$i18n.getString( "dataset_completed_report" )&nbsp;</a></li>	
 </ul>
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menuWithTree.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menuWithTree.vm	2009-09-15 04:00:03 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/menuWithTree.vm	2009-09-15 04:10:48 +0000
@@ -1,3 +1,3 @@
-#parse( "/dhis-web-excel-reporting/menu.vm" )
+#parse( "/dhis-web-vn-report/menu.vm" )
 <br>
 #parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm	2009-09-14 15:29:21 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/reportItems.vm	2009-09-15 04:10:48 +0000
@@ -75,12 +75,10 @@
 					<option value='dataelement_code'>$i18n.getString('dataelement_code')</option>
 					<option value='dataelement_name'>$i18n.getString('dataelement_name')</option>	
 					<option value='serial'>$i18n.getString('serial')</option>					
-					#else					
+					#else if($!reportExcel.getReportType()=='NORMAL')					
 					<option value='dataelement'>$i18n.getString('dataelement')</option>
 					<option value='formulaexcel'>$i18n.getString('formulaexcel')</option>					
-					<option value='indicator'>$i18n.getString('indicator')</option>
-					<option value='organisation'>$i18n.getString('organisation')</option>
-					<option value='serial'>$i18n.getString('serial')</option>
+					<option value='indicator'>$i18n.getString('indicator')</option>									
 					#end
 					
 				</select>
@@ -128,42 +126,6 @@
 </div>
 </form>
 
-
-
-<!-- This form use for  Calculation -->
-
-<div id="calculation" style="position:fixed;display:none;width:800px;z-index:10002;background-color: white;border: medium solid silver;height:300px;padding:20px;">
-	<div id="close" style="position:absolute;top:2px;right:2px;cursor: pointer;color:red;" onclick="$('#calculation').hide();">[x]</div>
-	<table width="100%">
-		<tr>
-			<th>$i18n.getString( "formula" )</th>
-			<th></th>
-			<th>$i18n.getString( "report_items" )</th>
-		<tr>
-		<tr valign="top">
-			<td>
-				<textarea id="formulaCalculation" cols="15" rows="11" style="width:250px; height:180px" wrap="virtual">$encoder.htmlEncode( $formula )</textarea><br>
-				<a href="#" onclick="insertOperation( 'formula','(' )"><img src="images/left_parent.png" alt="$i18n.getString( 'left_brackets' )"></a>
-				<a href="#" onclick="insertOperation( 'formula',')' )"><img src="images/right_parent.png" alt="$i18n.getString( 'right_brackets' )"></a>
-				<a href="#" onclick="insertOperation( 'formula','*' )"><img src="images/multiply.png" alt="$i18n.getString( 'multiply' )"></a>
-				<a href="#" onclick="insertOperation( 'formula','/' )"><img src="images/divide.png" alt="$i18n.getString( 'divide' )"></a>
-				<a href="#" onclick="insertOperation( 'formula','+' )"><img src="images/plus.png" alt="$i18n.getString( 'plus' )"></a>
-				<a href="#" onclick="insertOperation( 'formula','-' )"><img src="images/minus.png" alt="$i18n.getString( 'minus' )"></a>
-			</td>
-			<td valign="middle">
-				<input type="button" value="<" onclick="insertCalculation()"/>
-			</td>
-			<td>						
-				<select id="availableReportItems" size="13" style="min-width:500px"></select>					
-			</td>
-		</tr>	
-	</table>	
-	<p>
-	<input type="button" value="$i18n.getString('ok')" onclick="$('#expression').val($('#formulaCalculation').html());$('#calculation').hide();"/>
-	<input type="button" value="$i18n.getString('clean')" onclick="$('#formulaCalculation').html('')"/></p>
-</div>
-
-
 <!-- This form use for  dataelement -->
 
 <div id="normal" style="position:fixed;display:none;width:800px;z-index:10002;background-color: white;border: medium solid silver;height:300px;padding:20px;">
@@ -188,7 +150,7 @@
 				<input type="button" value="<" onclick="insertDataElementId()"/>
 			</td>
 			<td>	
-				<select id="dataElementGroup" style="min-width:500px" onchange="filterDataElements()"></select>				
+				<select id="dataElementGroup" style="min-width:500px" onchange="getDataElementsByGroup()"></select>				
 				<select id="availableDataElements" size="11" style="min-width:500px"></select>	
 				<select id="optionCombos" size=4 style="min-width:500px"></select>	
 			</td>
@@ -264,56 +226,6 @@
 	<input type="button" value="$i18n.getString('clean')" onclick="$('#categoryFormula').html('')"/></p>
 </div>
 
-
-<!--
-<div id="formulaDiv" style="position:fixed;display:none;width:800px;z-index:10002;background-color: white;border: medium solid silver;height:300px;padding:20px;">
-<div id="close" style="position:absolute;top:2px;right:2px;cursor: pointer;color:red;" onclick="hideById('formulaDiv');">[x]</div>
-
-
-	
-	<table width="100%">
-		<tr>
-			<th>$i18n.getString( "formula" )</th>
-			<th>$i18n.getString( "dataelement" )</th>
-		<tr>
-		<tr valign="top">
-			<td>
-				<textarea id="formula" cols="15" rows="11" style="width:250px; height:180px" wrap="virtual">$encoder.htmlEncode( $formula )</textarea><br>
-				<a href="#" onclick="insertFormulaText('(' )"><img src="images/left_parent.png" alt="$i18n.getString( 'left_brackets' )"></a>
-				<a href="#" onclick="insertFormulaText( ')' )"><img src="images/right_parent.png" alt="$i18n.getString( 'right_brackets' )"></a>
-				<a href="#" onclick="insertFormulaText( '*' )"><img src="images/multiply.png" alt="$i18n.getString( 'multiply' )"></a>
-				<a href="#" onclick="insertFormulaText( '/' )"><img src="images/divide.png" alt="$i18n.getString( 'divide' )"></a>
-				<a href="#" onclick="insertFormulaText( '+' )"><img src="images/plus.png" alt="$i18n.getString( 'plus' )"></a>
-				<a href="#" onclick="insertFormulaText( '-' )"><img src="images/minus.png" alt="$i18n.getString( 'minus' )"></a>
-			</td>
-			<td>			
-				<div id="optionComboDiv" style="display:none;">
-
-					<select id="cateCombo" style="min-width:450px" onchange="javascript: showCateOptionCombos(this.id);">
-						<option value="-1">[ $i18n.getString( "choose_category_combo" ) ]</option>
-					</select>
-					
-					<select id="cateOptionCombo" size="11" style="min-width:450px" ondblclick="insertFormulaText(this.value);">
-					
-					</select>
-				</div>
-
-				<select id="dataElementGroup" style="min-width:450px">					
-
-				</select>
-				
-				<select id="availableDataElements" size="11" style="min-width:450px" ondblclick="insertFormulaText(this.value);">
-				
-				</select>
-			</td>
-		</tr>
-		
-	</table>	
-	<p>
-	<input type="button" value="$i18n.getString('ok')" onclick="validateFormula();"/>
-	<input type="button" value="$i18n.getString('clean')" onclick="setFieldValue('formula','');"/></p>
-</div>
--->
 <span id="message" style="top:100px;right:5px;position:fixed;width:200px;z-index:10004" onclick="hideById(this.id);"></span>
 <span id="info" style="display:none;top:70px;right:5px;position:fixed;" onclick="hideById(this.id)"></span>
 
@@ -354,65 +266,13 @@
 			}else{
 				$("#expression").val(itemTypeValue);
 			}			
-		}else {
-			if(itemTypeValue == 'calculation') {
-				openCalculationExpression($reportExcel.id);	
-			}else if(itemTypeValue=='dataelement'){
+		}else {			
+			if(itemTypeValue=='dataelement'){
 				openDataElementExpression();
 			}else if(itemTypeValue=='indicator'){
 				openIndicatorExpression();
 			}
-		}
-/*		else if(itemTypeValue=='dataelement'){
-			getDataElementGroups();
-			filterDataElements();
-			byId('dataElementGroup').onchange=filterDataElements;
-			enable('dataElementGroup');
-			hideById('optionComboDiv');			
-		}
-		else if(itemTypeValue=='indicator'){
-			getIndicatorGroups();
-			filterIndicators();
-			byId('dataElementGroup').onchange=filterIndicators;
-			enable('dataElementGroup');
-			hideById('optionComboDiv');	
-		}else if(itemTypeValue=='category'){				
-		
-			if ('$!reportExcel.getReportType()' == 'category') {
-					
-				if( (itemTypeValue == 'dataelement') || (itemTypeValue == 'serial') || (itemTypeValue == 'icd_code') || (itemTypeValue == 'jumping_step') || (itemTypeValue == 'rename') ) {
-				
-					setFieldValue('expression', itemTypeValue );
-					
-					if ( itemTypeValue == 'rename' ) {
-						setFieldValue('expression', getFieldValue('name') );
-					}
- 					
-					hideById( 'formulaDiv' );
-					hideById('optionComboDiv');
-				}
-				if( itemTypeValue == 'element_optioncombo' ) {
-					
-					var elementList = byId( 'cateCombo' );
-					addOptionToList( elementList, '$!reportExcel.getCategoryCombo().id', '$!encoder.htmlEncode( $reportExcel.getCategoryCombo().name )' );
-					showById( 'formulaDiv' );
-					showById('optionComboDiv');
-					enable('cateCombo');
-					enable('cateOptionCombo');
-				}
-				
-				hideById('dataelement');
-				hideById('dataElementGroup');
-			}			
 		}		
-		
-		setFieldValue('formula', getFieldValue('expression'));
-		
-		setPositionCenter( 'formulaDiv' );	
-		showById( 'formulaDiv' );
-		
-		*/
-		
 	}
 	
 </script>