← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5862: Removed tally sheet generator functionality

 

------------------------------------------------------------
revno: 5862
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-02-05 14:28:15 +0100
message:
  Removed tally sheet generator functionality
removed:
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetPdfService.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetService.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/tallysheet/
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/tallysheet/TallySheetServiceTest.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/tallysheetgenerator.png
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/GenerateTallySheetAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/SelectTallySheetAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/ViewTallySheetAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/tallySheet.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTallySheetForm.vm
modified:
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.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
=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetPdfService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetPdfService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetPdfService.java	1970-01-01 00:00:00 +0000
@@ -1,233 +0,0 @@
-package org.hisp.dhis.tallysheet;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.system.util.PDFUtils;
-
-import com.lowagie.text.Document;
-import com.lowagie.text.DocumentException;
-import com.lowagie.text.Element;
-import com.lowagie.text.Font;
-import com.lowagie.text.PageSize;
-import com.lowagie.text.Paragraph;
-import com.lowagie.text.pdf.PdfPCell;
-import com.lowagie.text.pdf.PdfPTable;
-import com.lowagie.text.pdf.PdfWriter;
-
-/**
- * @author Haavard Tegelsrud, Oddmund Stroemme, Joergen Froeysadal, Ruben
- *         Wangberg
- * @version $Id$
- */
-public class DefaultTallySheetPdfService
-    implements TallySheetPdfService
-{
-    //TODO this class must be improved and use PdfUtils
-    
-    private static Font headerFont;
-
-    private static Font tableFont;
-
-    // -------------------------------------------------------------------------
-    // Logic
-    // -------------------------------------------------------------------------
-
-    public InputStream createTallySheetPdf( TallySheet tallySheet, I18n i18n )
-    {
-        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-        InputStream inputStream = null;
-        Document document = new Document();
-        String facilityName = "";
-
-        boolean a3Format = tallySheet.isA3Format();
-
-        if ( tallySheet.isDisplayFacilityName() )
-        {
-            facilityName = tallySheet.getFacilityName();
-        }
-
-        try
-        {
-            document.setPageSize( a3Format ? PageSize.A3 : PageSize.A4 );
-            PdfWriter.getInstance( document, outputStream );
-
-            writeMetadata( document, tallySheet.getTallySheetName(), i18n );
-
-            document.open();
-            initFont();
-            writeHeader( document, tallySheet.getTallySheetName(), facilityName, i18n );
-            writeLines( document, tallySheet.getTallySheetTuples(), a3Format, tallySheet.getRowWidth() );
-            document.close();
-
-            inputStream = new ByteArrayInputStream( outputStream.toByteArray() );
-        }
-        catch ( DocumentException e )
-        {
-            e.printStackTrace();
-        }
-
-        return inputStream;
-    }
-
-    private void writeMetadata( Document document, String title, I18n i18n )
-    {
-        document.addTitle( title );
-        document.addAuthor( "DHIS 2" );
-
-        if ( i18n != null )
-        {
-            document.addSubject( i18n.getString( "tally_sheet_report" ) );
-        }
-
-        document.addKeywords( "tallysheet, health, data, tally sheet" );
-        document.addCreator( "DHIS 2" );
-    }
-
-    private void writeHeader( Document document, String header, String facilityName, I18n i18n )
-        throws DocumentException
-    {
-        document.add( new Paragraph( header, headerFont ) );
-
-        if ( i18n != null )
-        {
-            document.add( new Paragraph( i18n.getString( "facility" ) + ": " + facilityName, headerFont ) );
-            document.add( new Paragraph( i18n.getString( "month" ) + ": ", headerFont ) );
-            document.add( new Paragraph( i18n.getString( "year" ) + ": ", headerFont ) );
-
-            Paragraph totalParagraph = new Paragraph( i18n.getString( "total" ) + ": ", headerFont );
-            totalParagraph.setAlignment( "right" );
-            totalParagraph.setIndentationRight( 10 );
-            totalParagraph.setSpacingAfter( 2 );
-            document.add( totalParagraph );
-        }
-    }
-
-    private void writeLines( Document document, List<TallySheetTuple> tallySheetTuples, boolean a3Format, int rowWidth )
-        throws DocumentException
-    {
-        double a4Multiplier = (PageSize.A3.getWidth() / PageSize.A4.getWidth()) * 1.1;
-        float[] widths = { 0.2f, 0.55f, 0.05f };
-
-        if ( !a3Format )
-        {
-            widths[0] = (float) (widths[0] * a4Multiplier);
-            widths[2] = (float) (widths[2] * a4Multiplier);
-            widths[1] = 1f - widths[0] - widths[2];
-        }
-
-        PdfPTable table = new PdfPTable( widths );
-        table.setWidthPercentage( 100 );
-
-        DataElement dataElement;
-
-        for ( TallySheetTuple tallySheetTuple : tallySheetTuples )
-        {
-            dataElement = tallySheetTuple.getDataElement();
-            int rows = tallySheetTuple.getNumberOfRows();
-            if ( tallySheetTuple.isChecked() && rows > 0 )
-            {
-                table.addCell( createNameCell( dataElement.getName(), tableFont ) );
-                table.addCell( createCellsCell( rows, tableFont, rowWidth ) );
-                table.addCell( createTotalBoxCell( tableFont ) );
-            }
-        }
-        document.add( table );
-    }
-
-    private PdfPCell createNameCell( String elementName, Font font )
-    {
-        PdfPCell nameCell = new PdfPCell( new Paragraph( elementName, font ) );
-        nameCell.setBorderWidth( 0 );
-        nameCell.setBorderWidthTop( (float) 0.5 );
-        nameCell.setHorizontalAlignment( Element.ALIGN_LEFT );
-        return nameCell;
-    }
-
-    private PdfPCell createCellsCell( int rows, Font font, int rowWidth )
-    {
-        StringBuilder cellRows = new StringBuilder();
-
-        for ( int i = 0; i < rows; i++ )
-        {
-            if ( i > 0 )
-            {
-                cellRows.append( "\n" );
-            }
-
-            for ( int j = 0; j < rowWidth; j++ )
-            {
-                if ( j % 5 == 0 )
-                {
-                    cellRows.append( " " );
-                }
-
-                if ( j != 0 && j % 25 == 0 )
-                {
-                    cellRows.append( "    " );
-                }
-
-                cellRows.append( "0" );
-            }
-        }
-
-        Paragraph cellParagraph = new Paragraph( cellRows.toString(), font );
-        PdfPCell cellCell = new PdfPCell( cellParagraph );
-        cellCell.setBorderWidth( 0 );
-        cellCell.setBorderWidthTop( (float) 0.5 );
-        cellCell.setHorizontalAlignment( Element.ALIGN_RIGHT );
-        cellCell.setPaddingBottom( 4 );
-        return cellCell;
-    }
-
-    private PdfPCell createTotalBoxCell( Font font )
-    {
-        PdfPCell boxCell = new PdfPCell();
-        PdfPTable totalTable = new PdfPTable( 1 );
-        PdfPCell totalCell = new PdfPCell();
-        totalCell.setBorderWidth( (float) 0.5 );
-        totalCell.setFixedHeight( (float) (font.getCalculatedSize() * 1.2) );
-        totalTable.addCell( totalCell );
-        boxCell.addElement( totalTable );
-        boxCell.setBorderWidth( 0 );
-        boxCell.setBorderWidthTop( (float) 0.5 );
-        return boxCell;
-    }
-
-    private void initFont()
-    {
-        headerFont = PDFUtils.getBoldFont( 12 );
-        tableFont = PDFUtils.getFont( 8 );
-    }
-}

=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/tallysheet/DefaultTallySheetService.java	1970-01-01 00:00:00 +0000
@@ -1,140 +0,0 @@
-package org.hisp.dhis.tallysheet;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.PeriodType;
-
-/**
- * @author Haavard Tegelsrud, Oddmund Stroemme, Joergen Froeysadal, Ruben
- *         Wangberg
- * @version $Id$
- */
-public class DefaultTallySheetService
-    implements TallySheetService
-{
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private DataValueService dataValueService;
-
-    public void setDataValueService( DataValueService dataValueService )
-    {
-        this.dataValueService = dataValueService;
-    }
-
-    // -------------------------------------------------------------------------
-    // TallySheetService implementation
-    // -------------------------------------------------------------------------
-
-    // -------------------------------------------------------------------------
-    // Logic
-    // -------------------------------------------------------------------------
-
-    public TallySheet createTallySheet( OrganisationUnit organisationUnit, List<DataElement> dataElements,
-        boolean a3Format, boolean displayFacilityName, DataSet selectedDataSet, String tallySheetName )
-    {
-        PeriodType periodType = selectedDataSet.getPeriodType();
-
-        Collection<DataValue> dataValues = new HashSet<DataValue>();
-
-        for ( DataElement dataElement : dataElements )
-        {
-
-            DataValue dataValue = dataValueService.getLatestDataValues( dataElement, periodType, organisationUnit );
-
-            if ( dataValue != null )
-            {
-                dataValues.add( dataValue );
-            }
-
-        }
-
-        return internalCreateTallySheet( organisationUnit, dataElements, dataValues, a3Format, displayFacilityName,
-            tallySheetName );
-    }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private TallySheet internalCreateTallySheet( OrganisationUnit organisationUnit, List<DataElement> dataElements,
-        Collection<DataValue> dataValues, boolean a3Format, boolean displayFacilityName, String tallySheetName )
-    {
-        TallySheet tallySheet = new TallySheet();
-
-        tallySheet.setTallySheetName( tallySheetName );
-        tallySheet.setA3Format( a3Format );
-        tallySheet.setDisplayFacilityName( displayFacilityName );
-        tallySheet.setOrganisationUnit( organisationUnit );
-
-        List<TallySheetTuple> tallySheetTuples = new ArrayList<TallySheetTuple>();
-
-        for ( DataElement dataElement : dataElements )
-        {
-            int calculatedNumberOfElements = 0;
-
-            for ( DataValue dataValue : dataValues )
-            {
-
-                if ( dataValue.getSource().equals( organisationUnit )
-                    && dataValue.getDataElement().equals( dataElement ) )
-                {
-                    try
-                    {
-                        calculatedNumberOfElements = Integer.parseInt( dataValue.getValue() );
-                    }
-                    catch ( NumberFormatException e )
-                    {
-                        continue;
-                    }
-
-                    break;
-                }
-            }
-
-            TallySheetTuple tallySheetTuple = new TallySheetTuple();
-            tallySheetTuple.setTallySheetTuple( calculatedNumberOfElements, dataElement, tallySheet.getRowWidth() );
-            tallySheetTuples.add( tallySheetTuple );
-        }
-
-        tallySheet.setTallySheetTuples( tallySheetTuples );
-
-        return tallySheet;
-    }
-}

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-02-02 20:01:36 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-02-05 13:28:15 +0000
@@ -233,14 +233,6 @@
     </property>
   </bean>
 
-  <!-- Tally Sheet -->
-
-  <bean id="org.hisp.dhis.tallysheet.TallySheetService" class="org.hisp.dhis.tallysheet.DefaultTallySheetService">
-    <property name="dataValueService" ref="org.hisp.dhis.datavalue.DataValueService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.tallysheet.TallySheetPdfService" class="org.hisp.dhis.tallysheet.DefaultTallySheetPdfService" />
-
   <!-- Organisation Unit Distribution -->
 
   <bean id="org.hisp.dhis.orgunitdistribution.OrgUnitDistributionService" class="org.hisp.dhis.orgunitdistribution.impl.DefaultOrgUnitDistributionService">

=== removed directory 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/tallysheet'
=== removed file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/tallysheet/TallySheetServiceTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/tallysheet/TallySheetServiceTest.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/tallysheet/TallySheetServiceTest.java	1970-01-01 00:00:00 +0000
@@ -1,86 +0,0 @@
-package org.hisp.dhis.tallysheet;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import static junit.framework.Assert.assertNotNull;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.hisp.dhis.DhisSpringTest;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.period.MonthlyPeriodType;
-import org.junit.Test;
-
-/**
- * @author Haavard Tegelsrud, Oddmund Stroemme, Joergen Froeysadal, Ruben
- *         Wangberg
- * @version $Id$
- */
-public class TallySheetServiceTest
-    extends DhisSpringTest
-{
-    private TallySheetService tallySheetService;
-
-    private TallySheetPdfService tallySheetPdfService;
-
-    @Override
-    public void setUpTest()
-    {
-        tallySheetService = (TallySheetService) getBean( TallySheetService.ID );
-
-        tallySheetPdfService = (TallySheetPdfService) getBean( TallySheetPdfService.ID );
-    }
-
-    @Test
-    public void testCreateTallySheet()
-    {
-        List<DataElement> dataElements = new ArrayList<DataElement>();
-
-        TallySheet tallySheet = tallySheetService.createTallySheet( createOrganisationUnit( 'A' ), dataElements, false,
-            true, createDataSet( 'A', new MonthlyPeriodType() ), "DHIS 2" );
-
-        assertNotNull( tallySheet );
-    }
-
-    @Test
-    public void testCreateTallySheetPdf()
-    {
-        List<DataElement> dataElements = new ArrayList<DataElement>();
-
-        TallySheet tallySheet = tallySheetService.createTallySheet( createOrganisationUnit( 'A' ), dataElements, false,
-            true, createDataSet( 'A', new MonthlyPeriodType() ), "DHIS 2" );
-
-        assertNotNull( tallySheet );
-
-        InputStream in = tallySheetPdfService.createTallySheetPdf( tallySheet, null );
-
-        assertNotNull( in );
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/tallysheetgenerator.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/tallysheetgenerator.png	2010-06-19 15:32:24 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/tallysheetgenerator.png	1970-01-01 00:00:00 +0000 differ
=== removed directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet'
=== removed directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action'
=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/GenerateTallySheetAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/GenerateTallySheetAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/GenerateTallySheetAction.java	1970-01-01 00:00:00 +0000
@@ -1,140 +0,0 @@
-package org.hisp.dhis.reporting.tallysheet.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.io.InputStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.tallysheet.TallySheet;
-import org.hisp.dhis.tallysheet.TallySheetPdfService;
-import org.hisp.dhis.tallysheet.TallySheetTuple;
-
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionContext;
-
-/**
- * @author Haavard Tegelsrud, Oddmund Stroemme, Joergen Froeysadal, Ruben
- *         Wangberg
- * @version $Id$
- */
-public class GenerateTallySheetAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private int[] rows;
-
-    public void setRows( int[] rows )
-    {
-        this.rows = rows;
-    }
-
-    private boolean[] checked;
-
-    public void setChecked( boolean[] checked )
-    {
-        this.checked = checked;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private String fileName;
-
-    public String getFileName()
-    {
-        return fileName;
-    }
-
-    private InputStream inputStream;
-
-    public InputStream getInputStream()
-    {
-        return inputStream;
-    }
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private TallySheetPdfService tallySheetPdfService;
-
-    public void setTallySheetPdfService( TallySheetPdfService tallySheetPdfService )
-    {
-        this.tallySheetPdfService = tallySheetPdfService;
-    }
-
-    // -------------------------------------------------------------------------
-    // I18n
-    // -------------------------------------------------------------------------
-
-    private I18n i18n;
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-        throws Exception
-    {
-        TallySheet tallySheet = (TallySheet) ActionContext.getContext().getSession().get( TallySheet.KEY_TALLY_SHEET );
-
-        if ( tallySheet != null )
-        {
-            List<TallySheetTuple> tallySheetTuples = tallySheet.getTallySheetTuples();
-
-            for ( int i = 0; i < checked.length; i++ )
-            {
-                TallySheetTuple tallySheetTuple = tallySheetTuples.get( i );
-                tallySheetTuple.setChecked( checked[i] );
-                tallySheetTuple.setNumberOfRows( rows[i] );
-            }
-
-            Date today = new java.util.Date();
-            DateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
-            String timestamp = dateFormat.format( today );
-
-            fileName = timestamp + "_" + tallySheet.getTallySheetName() + ".pdf";
-            inputStream = tallySheetPdfService.createTallySheetPdf( tallySheet, i18n );
-        }
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/SelectTallySheetAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/SelectTallySheetAction.java	2012-01-25 17:11:43 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/SelectTallySheetAction.java	1970-01-01 00:00:00 +0000
@@ -1,82 +0,0 @@
-package org.hisp.dhis.reporting.tallysheet.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Haavard Tegelsrud, Oddmund Stroemme, Joergen Froeysadal, Ruben Wangberg
- * @version $Id$
- */
-public class SelectTallySheetAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Parameters
-    // -------------------------------------------------------------------------
-
-    private List<DataSet> dataSets = new ArrayList<DataSet>();
-
-    public Collection<DataSet> getDataSets()
-    {
-        return dataSets;
-    }    
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-    
-    public String execute()
-        throws Exception
-    {
-        dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
-        Collections.sort( dataSets, IdentifiableObjectNameComparator.INSTANCE );
-
-        return SUCCESS;
-    }
-}

=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/ViewTallySheetAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/ViewTallySheetAction.java	2012-01-25 17:11:43 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tallysheet/action/ViewTallySheetAction.java	1970-01-01 00:00:00 +0000
@@ -1,202 +0,0 @@
-package org.hisp.dhis.reporting.tallysheet.action;
-
-/*
- * Copyright (c) 2004-2012, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.oust.manager.SelectionTreeManager;
-import org.hisp.dhis.tallysheet.TallySheet;
-import org.hisp.dhis.tallysheet.TallySheetService;
-import org.hisp.dhis.tallysheet.TallySheetTuple;
-
-import com.opensymphony.xwork2.Action;
-import com.opensymphony.xwork2.ActionContext;
-
-/**
- * @author Haavard Tegelsrud, Oddmund Stroemme, Joergen Froeysadal, Ruben
- *         Wangberg
- * @version $Id$
- */
-public class ViewTallySheetAction
-    implements Action
-{
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private String tallySheetName;
-
-    public void setTallySheetName( String tallySheetName )
-    {
-        this.tallySheetName = tallySheetName;
-    }
-
-    private boolean largeFormat;
-
-    public void setLargeFormat( boolean largeFormat )
-    {
-        this.largeFormat = largeFormat;
-    }
-
-    private boolean displayFacilityName;
-
-    public void setDisplayFacilityName( boolean displayFacilityName )
-    {
-        this.displayFacilityName = displayFacilityName;
-    }
-
-    private Integer selectedDataSetId;
-
-    public void setSelectedDataSetId( Integer selectedDataSetId )
-    {
-        this.selectedDataSetId = selectedDataSetId;
-    }
-
-    private double factor = 1;
-
-    public double getFactor()
-    {
-        return factor;
-    }
-
-    public void setFactor( double factor )
-    {
-        this.factor = factor;
-    }
-
-    private boolean[] checked;
-
-    public void setChecked( boolean[] checked )
-    {
-        this.checked = checked;
-    }
-
-    private boolean recalculate = false;
-
-    public void setRecalculate( boolean recalculate )
-    {
-        this.recalculate = recalculate;
-    }
-
-    // -------------------------------------------------------------------------
-    // Output
-    // -------------------------------------------------------------------------
-
-    private TallySheet tallySheet;
-
-    public TallySheet getTallySheet()
-    {
-        return tallySheet;
-    }
-
-    private List<TallySheetTuple> tallySheetTuples;
-
-    public List<TallySheetTuple> getTallySheetTuples()
-    {
-        return tallySheetTuples;
-    }
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private TallySheetService tallySheetService;
-
-    public void setTallySheetService( TallySheetService tallySheetService )
-    {
-        this.tallySheetService = tallySheetService;
-    }
-
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
-    private SelectionTreeManager selectionTreeManager;
-
-    public void setSelectionTreeManager( SelectionTreeManager selectionTreeManager )
-    {
-        this.selectionTreeManager = selectionTreeManager;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    private ArrayList<DataElement> dataElements;
-
-    private OrganisationUnit organisationUnit;
-
-    private DataSet selectedDataSet;
-
-    public String execute()
-        throws Exception
-    {
-        if ( recalculate )
-        {
-            tallySheet = (TallySheet) ActionContext.getContext().getSession().get( TallySheet.KEY_TALLY_SHEET );
-
-            if ( tallySheet != null )
-            {
-                tallySheetTuples = tallySheet.getTallySheetTuples();
-
-                for ( int i = 0; i < checked.length; i++ )
-                {
-                    TallySheetTuple tallySheetTuple = tallySheetTuples.get( i );
-                    tallySheetTuple.setChecked( checked[i] );
-                    tallySheetTuple.recalculateRows( factor );
-                }
-            }
-
-            return SUCCESS;
-        }
-
-        organisationUnit = selectionTreeManager.getSelectedOrganisationUnit();
-        selectedDataSet = dataSetService.getDataSet( selectedDataSetId );
-        dataElements = new ArrayList<DataElement>( dataSetService.getDataElements( selectedDataSet ) );
-        Collections.sort( dataElements, IdentifiableObjectNameComparator.INSTANCE );
-
-        tallySheet = tallySheetService.createTallySheet( organisationUnit, dataElements, largeFormat,
-            displayFacilityName, selectedDataSet, tallySheetName );
-
-        tallySheetTuples = tallySheet.getTallySheetTuples();
-
-        ActionContext.getContext().getSession().put( TallySheet.KEY_TALLY_SHEET, tallySheet );
-
-        return SUCCESS;
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-01-05 20:39:23 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml	2012-02-05 13:28:15 +0000
@@ -231,25 +231,6 @@
     <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
     <property name="selectionTreeManager" ref="org.hisp.dhis.oust.manager.SelectionTreeManager" />
   </bean>
-      
-  <!-- Tallysheet -->
-
-  <bean id="org.hisp.dhis.reporting.tallysheet.action.SelectTallySheetAction" class="org.hisp.dhis.reporting.tallysheet.action.SelectTallySheetAction"
-    scope="prototype">
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.reporting.tallysheet.action.ViewTallySheetAction" class="org.hisp.dhis.reporting.tallysheet.action.ViewTallySheetAction"
-    scope="prototype">
-    <property name="tallySheetService" ref="org.hisp.dhis.tallysheet.TallySheetService" />
-    <property name="selectionTreeManager" ref="org.hisp.dhis.oust.manager.SelectionTreeManager" />
-    <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
-  </bean>
-
-  <bean id="org.hisp.dhis.reporting.tallysheet.action.GenerateTallySheetAction" class="org.hisp.dhis.reporting.tallysheet.action.GenerateTallySheetAction"
-    scope="prototype">
-    <property name="tallySheetPdfService" ref="org.hisp.dhis.tallysheet.TallySheetPdfService" />
-  </bean>
   
   <!-- Organisation Unit Distribution -->
 

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2011-12-22 21:17:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2012-02-05 13:28:15 +0000
@@ -265,34 +265,7 @@
       <result name="xls" type="gridXlsResult" />
       <result name="pdf" type="gridPdfResult" />
     </action>
-	
-    <!-- Tally Sheet Forms Generator -->
-
-    <action name="tallySheetGenerator" class="org.hisp.dhis.reporting.tallysheet.action.SelectTallySheetAction">
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="menuTreeHeight">420</param>
-      <param name="page">/dhis-web-reporting/selectTallySheetForm.vm</param>
-      <param name="menu">/dhis-web-reporting/menu.vm</param>
-      <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/tallySheet.js</param>
-    </action>
-
-    <action name="configureTallySheetGenerator" class="org.hisp.dhis.reporting.tallysheet.action.ViewTallySheetAction">
-      <result name="success" type="velocity">/main.vm</result>
-      <param name="menuTreeHeight">420</param>
-      <param name="page">/dhis-web-reporting/viewTallySheetForm.vm</param>
-      <param name="menu">/dhis-web-reporting/menu.vm</param>
-      <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/tallySheet.js</param>
-    </action>
-
-    <action name="generateTallySheetPDF" class="org.hisp.dhis.reporting.tallysheet.action.GenerateTallySheetAction">
-      <result name="success" type="stream">
-        <param name="contentType">application/pdf</param>
-        <param name="inputName">inputStream</param>
-        <param name="contentDisposition">filename="${fileName}"</param>
-        <param name="bufferSize">1024</param>
-      </result>
-    </action>
-        
+	        
     <!-- Organisation Unit Distribution -->
 
     <action name="getOrgUnitDistribution" class="org.hisp.dhis.reporting.orgunitdistribution.action.GetOrgUnitDistributionAction">

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm	2011-12-22 21:17:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/index.vm	2012-02-05 13:28:15 +0000
@@ -13,7 +13,6 @@
     #introListImgItem( "displayViewDataCompletenessForm.action" "reporting_rate_summary" "reportingratesummary" )
     #introListImgItem( "displayViewDocumentForm.action" "resource" "resource" )
     #introListImgItem( "displayOrgUnitDistribution.action" "orgunit_distribution_report" "distribution" )
-    #introListImgItem( "tallySheetGenerator.action" "tally_sheet_generator" "tallysheetgenerator" )
     #introListImgItem( "displayManageTableForm.action" "report_table" "reporttable" )
     #introListImgItem( "displayPivotTableForm.action" "pivot_table" "pivottable" )
 </ul>

=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/tallySheet.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/tallySheet.js	2011-08-19 21:33:57 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/tallySheet.js	1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-//-----------------------------------------------------------------------------
-// Step 1 functions
-//----------------------------------------------------------------------------
-
-function continueToStepTwo()
-{
-    if ( validateData() )
-    {
-        setHeaderWaitMessage( i18n_processing + "..." );
-        byId( "tallySheetForm" ).submit();
-    }
-}
-
-// -----------------------------------------------------------------------------
-// Step 2 functions
-// ----------------------------------------------------------------------------
-
-function setChecked( id )
-{
-    var value = byId( "checkbox" + id ).checked;
-    byId( "checked" + id ).value = value;
-
-    if ( value == true )
-    {
-        if ( byId( "rows" + id ).value == 0 )
-        {
-            byId( "rows" + id ).value = 1;
-        }
-    }
-}
-
-function doRecalculate()
-{
-    byId( 'recalculate' ).value = true;
-    byId( 'configureTallySheetForm' ).submit();
-}
-
-function selectAll()
-{
-    var length = document.configureTallySheetForm.checkbox.length;
-
-    for ( var i = 0; i < length; i++ )
-    {
-        document.configureTallySheetForm.checkbox[i].checked = true;
-        document.configureTallySheetForm.checked[i].value = true;
-        if ( document.configureTallySheetForm.rows[i].value == 0 )
-        {
-            document.configureTallySheetForm.rows[i].value = 1;
-        }
-    }
-}
-
-function selectNone()
-{
-    var length = document.configureTallySheetForm.checkbox.length;
-
-    for ( var i = 0; i < length; i++ )
-    {
-        document.configureTallySheetForm.checkbox[i].checked = false;
-        document.configureTallySheetForm.checked[i].value = false;
-    }
-}
-
-function generatePdf()
-{
-    byId( 'configureTallySheetForm' ).action = "generateTallySheetPDF.action";
-    byId( 'configureTallySheetForm' ).submit();
-    byId( 'configureTallySheetForm' ).action = "configureTallySheetGenerator.action";
-}
-
-// -----------------------------------------------------------------------------
-// Validation
-// ----------------------------------------------------------------------------
-
-var selectedOrganisationUnitIds = null;
-
-function setSelectedOrganisationUnitIds( ids )
-{
-    selectedOrganisationUnitIds = ids;
-}
-
-function validateData()
-{
-    var tallySheetName = byId( "tallySheetName" ).value;
-
-    if ( !getListValue( "selectedDataSetId" ) || getListValue( "selectedDataSetId" ) == "null" )
-    {
-        setHeaderDelayMessage( i18n_select_data_set );
-        return false;
-    }
-
-    if ( !tallySheetName )
-    {
-        setHeaderDelayMessage( i18n_type_tally_sheet_name );
-        return false;
-    }
-
-    if ( selectedOrganisationUnitIds == null || selectedOrganisationUnitIds.length == 0 )
-    {
-        setHeaderDelayMessage( i18n_select_organisation_unit );
-        return false;
-    }
-
-    return true;
-}
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm	2011-12-22 21:17:05 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/menu.vm	2012-02-05 13:28:15 +0000
@@ -6,11 +6,6 @@
 	<li><a href="displayViewDataCompletenessForm.action">$i18n.getString( "reporting_rate_summary" )&nbsp;</a></li>
     <li><a href="displayViewDocumentForm.action">$i18n.getString( "resource" )&nbsp;</a></li>
     <li><a href="displayOrgUnitDistribution.action">$i18n.getString( "organisation_unit_report" )&nbsp;</a></li>
-	<li><a href="tallySheetGenerator.action">$i18n.getString( "tally_sheet_generator" )&nbsp;</a></li>
 	<li><a href="displayManageTableForm.action">$i18n.getString( "report_table" )&nbsp;</a></li>
-</ul>
-
-<h2>$i18n.getString( "pivot_table" )&nbsp;</h2>
-<ul>
 	<li><a href="displayPivotTableForm.action">$i18n.getString( "pivot_table" )&nbsp;</a></li>
 </ul>

=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTallySheetForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTallySheetForm.vm	2011-03-28 20:09:32 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTallySheetForm.vm	1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
-<h3>$i18n.getString( "tally_sheet_generator" )</h3>
-
-<form id="configureTallySheetForm" name="configureTallySheetForm" action="configureTallySheetGenerator.action" method="post">	
-	<table>
-		<tr>
-			<th colspan="2">$i18n.getString( "tally_sheet_step2" )</th>
-		</tr>
-		<tr>
-			<td>
-				<div style="width:500px;height:400px;overflow:auto;border:1px solid #cccccc">
-					<table>
-						<tr style="font-weight: bold">
-							<td>$i18n.getString("data_element")</td>
-							<td>$i18n.getString("select")</td>
-							<td>$i18n.getString("tally_rows")</td>
-						</tr>
-						#foreach( $tallySheetTuple in $tallySheetTuples )
-						<tr>
-							<td>
-								$tallySheetTuple.getDataElement().getName()
-							</td>
-							<td style="text-align: right">
-								<input id="checkbox$velocityCount" name="checkbox" type="checkbox" #if( $tallySheetTuple.isChecked() ) checked="checked" #end onchange="setChecked($velocityCount);"/>
-								<input type="hidden" id="checked$velocityCount" name="checked" value="$tallySheetTuple.isChecked()"/>
-							</td>
-							<td style="text-align: right">
-								<input type="text" size="3" style="text-align: right" id="rows$velocityCount" name="rows" value="$tallySheetTuple.getNumberOfRows()"/>
-							</td>
-						</tr>
-						#end
-					</table>
-				</div>
-			</td>
-			<td style="vertical-align: top; text-align: right;">
-				<div style="width: 140px; height: 40px; text-align: center; border:1px solid #cccccc">
-					$i18n.getString( "edit_tally_rows" )
-				</div>
-				Factor <input type="text" size="3" style="text-align: right; margin-top:15px;" id="factor" name="factor" value="$factor"><br>
-				<input type="button" value="$i18n.getString( 'calculate_tally_rows' )" style="width:130px; margin-top:15px;" onclick="doRecalculate();" /><br/>
-				<input type="hidden" name="recalculate" id="recalculate" value="$recalculate" />
-				<input type="button" value="$i18n.getString( 'generate_pdf' )" style="width:130px; margin-top:15px;" onclick="generatePdf();" /><br/>
-				<input type="button" value="$i18n.getString( 'back' )" style="width:130px; margin-top:15px;" onclick="window.location.href='tallySheetGenerator.action'" />
-			</td>
-		</tr>
-		<tr>
-			<td><div id="buttonrow" style="text-align: right; margin-top: 5px;">
-				<input type="button" style="width:115px" value="$i18n.getString( 'select_all' )" onclick="selectAll();"/>
-				<input type="button" style="width:115px" value="$i18n.getString( 'select_none' )" onclick="selectNone();"/>
-			</div></td>
-		</tr>
-	</table>
-</form>