~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to local/in/dhis-web-reports/src/main/webapp/dhis-web-reports/MadhyaPradesh/mcommdis-d.jsp

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<%@ page import="java.sql.*,java.util.*" %>
 
3
<%@ page import="com.opensymphony.xwork.util.OgnlValueStack" %>
 
4
 
 
5
<%@ page session="true"%>
 
6
 
 
7
 
 
8
<%
 
9
    Connection con=null;
 
10
            
 
11
    // For finding organisationunit name of selected Orgunit based on Orgunit id
 
12
    Statement st1=null;
 
13
    ResultSet rs1=null;
 
14
      
 
15
    // For finding start date of selected period based on period id
 
16
    Statement st2=null;
 
17
    ResultSet rs2=null;
 
18
 
 
19
  
 
20
   // For finding datavalues 
 
21
    Statement st3=null;
 
22
    ResultSet rs3=null;
 
23
 
 
24
  
 
25
    String userName = "dhis";      
 
26
    String password = "";           
 
27
    String urlForConnection = "jdbc:mysql://localhost/mp_dhis2";
 
28
          
 
29
        OgnlValueStack stack = (OgnlValueStack)request.getAttribute("webwork.valueStack");
 
30
 
 
31
        String selectedId = (String) stack.findValue( "orgUnitId" );
 
32
        int selectedOrgUnitID = Integer.parseInt( selectedId );
 
33
 
 
34
//      int selectedOrgUnitID = 239;
 
35
 
 
36
        
 
37
//      String selectedPeriodId = (String) stack.findValue( "periodSelect" );
 
38
//      int selectedDataPeriodID = Integer.parseInt( selectedPeriodId );
 
39
  
 
40
        String startingDate  = (String) stack.findValue( "startingPeriod" );
 
41
        String endingDate  = (String) stack.findValue( "endingPeriod" );
 
42
 
 
43
//      String startingDate  = "2006-06-01";
 
44
//      String endingDate  = "2006-06-01";
 
45
 
 
46
    
 
47
//      String monthlyPeriodId = (String) stack.findValue( "monthlyPeriodTypeId" );
 
48
//      int periodTypeID =      Integer.parseInt( monthlyPeriodId );
 
49
 
 
50
      
 
51
        String selectedOrgUnitName = "";        
 
52
        String selectedDataPeriodStartDate = ""; 
 
53
        
 
54
        String monthNames[] = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September","October", "November", "December" };                  
 
55
 
 
56
        String monthlyDataElements[] = {                                                                                        
 
57
                                                                                        // Acute Diarrhoeal Diseases - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
58
                                                                                        "CD_DE1","CD_DE2","CD_DE37","CD_DE38","CD_DE73","CD_DE74",
 
59
                                                                                        
 
60
                                                                                        // Diphtheria - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
61
                                                                                        "CD_DE3","CD_DE4","CD_DE39","CD_DE40","CD_DE75","CD_DE76",
 
62
                                                                                        
 
63
                                                                                        // Acute Poliomyelitis - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
64
                                                                                        "CD_DE5","CD_DE6","CD_DE41","CD_DE42","CD_DE77","CD_DE78",
 
65
                                                                                        
 
66
                                                                                        // Tetanus other than Neonatal - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
67
                                                                                        "CD_DE7","CD_DE8","CD_DE43","CD_DE44","CD_DE79","CD_DE80",
 
68
                                                                                        
 
69
                                                                                        // Neo natal Tetanus - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
70
                                                                                        "CD_DE9","CD_DE10","CD_DE45","CD_DE46","CD_DE81","CD_DE82",
 
71
                                                                                        
 
72
                                                                                        // Whooping Cough - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
73
                                                                                        "CD_DE11","CD_DE12","CD_DE47","CD_DE48","CD_DE83","CD_DE84",
 
74
                                                                                        
 
75
                                                                                        // Measles - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
76
                                                                                        "CD_DE13","CD_DE14","CD_DE49","CD_DE50","CD_DE85","CD_DE86",
 
77
                                                                                        
 
78
                                                                                        // Acute Respiratory Infection - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
79
                                                                                        "CD_DE15","CD_DE16","CD_DE51","CD_DE52","CD_DE87","CD_DE88",
 
80
                                                                                        
 
81
                                                                                        // Pneumonia - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
82
                                                                                        "CD_DE17","CD_DE18","CD_DE53","CD_DE54","CD_DE89","CD_DE90",
 
83
                                                                                        
 
84
                                                                                        // Enteric Fever - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
85
                                                                                        "CD_DE19","CD_DE20","CD_DE55","CD_DE56","CD_DE91","CD_DE92",
 
86
                                                                                        
 
87
                                                                                        // Viral Hepatitis - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
88
                                                                                        "CD_DE21","CD_DE22","CD_DE57","CD_DE58","CD_DE93","CD_DE94",
 
89
                                                                                        
 
90
                                                                                        // Meningococcaol Meningitis - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
91
                                                                                        "CD_DE23","CD_DE24","CD_DE59","CD_DE60","CD_DE95","CD_DE96",
 
92
                                                                                        
 
93
                                                                                        // Japanese Encephalitis - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
94
                                                                                        "CD_DE25","CD_DE26","CD_DE61","CD_DE62","CD_DE97","CD_DE98",
 
95
                                                                                        
 
96
                                                                                        // Robies - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
97
                                                                                        "CD_DE27","CD_DE28","CD_DE63","CD_DE64","CD_DE99","CD_DE100",
 
98
                                                                                        
 
99
                                                                                        // Syphilis - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
100
                                                                                        "CD_DE29","CD_DE30","CD_DE65","CD_DE66","CD_DE101","CD_DE102",
 
101
                                                                                        
 
102
                                                                                        // Gonococcal Infection - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
103
                                                                                        "CD_DE31","CD_DE32","CD_DE67","CD_DE68","CD_DE103","CD_DE104",
 
104
                                                                                        
 
105
                                                                                        // Pulmonary Tuberculosis - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
106
                                                                                        "CD_DE33","CD_DE34","CD_DE69","CD_DE70","CD_DE105","CD_DE106",
 
107
                                                                                        
 
108
                                                                                        // All other diseases - OPD Male, OPD Female, IPD Male, IPD Female, IPD Deaths Male, IPD Deaths Female
 
109
                                                                                        "CD_DE35","CD_DE36","CD_DE71","CD_DE72","CD_DE107","CD_DE108"
 
110
                                                                                                                                                                                
 
111
                                                                                        
 
112
                                                                        };
 
113
        
 
114
        String nonCommDisNames[] = {
 
115
                                                                        "Acute Diarrhoeal Diseases <br><font face='arial' size='1'>(Including Gastro Entritis and Cholera)</font>",
 
116
                                                                        "Diphteria",
 
117
                                                                        "Acute Poliomyelitis",
 
118
                                                                        "Tetanus other than Neonatal",
 
119
                                                                        "Neo Natal Tetanus",
 
120
                                                                        "Whooping Cough",
 
121
                                                                        "Measels",
 
122
                                                                        "Acute Respiratory Infection<br><font face='arial' size='1'>(including Influenza and excluding Pneumonia)</font>",
 
123
                                                                        "Pneumonia",
 
124
                                                                        "Enteric Fever",
 
125
                                                                        "Viral Hepatits",
 
126
                                                                        "Meningococcaol Meningitis",
 
127
                                                                        "Japanese Encephalitis",
 
128
                                                                        "Robies (Dog Bite)",
 
129
                                                                        "Syphilis",
 
130
                                                                        "Gonococcal Infection",
 
131
                                                                        "Pulmonary Tuberculosis",
 
132
                                                                        "All other diseases treated in Institution excluding above mentioned diseases"
 
133
                                                                        
 
134
                                                                        
 
135
                                                        };      
 
136
                                                        
 
137
        String nonCommDisNo[] = {
 
138
                                                                "1.",
 
139
                                                                "2.",
 
140
                                                                "3.",
 
141
                                                                "4.",
 
142
                                                                "5.",
 
143
                                                                "6.",
 
144
                                                                "7.",
 
145
                                                                "8.",
 
146
                                                                "9.",
 
147
                                                                "10.",
 
148
                                                                "11.",
 
149
                                                                "12.",
 
150
                                                                "13.",
 
151
                                                                "14.",
 
152
                                                                "15.",
 
153
                                                                "16.",
 
154
                                                                "17.",
 
155
                                                                "18."
 
156
                                                        };      
 
157
                                                        
 
158
        
 
159
        List childOrgUnitIDs = new ArrayList(); 
 
160
        List childOrgUnitNames = new ArrayList();       
 
161
                
 
162
        int childOrgUnitCount = 0;      
 
163
        int count = 0;          
 
164
        int i=0;
 
165
        int totPopulation = 0;
 
166
                
 
167
        int tempval[] = new int[16];
 
168
        int total[] = new int[16];
 
169
%>
 
170
 
 
171
<%
 
172
     try
 
173
      {
 
174
        Class.forName ("com.mysql.jdbc.Driver").newInstance ();
 
175
        con = DriverManager.getConnection (urlForConnection, userName, password);
 
176
        
 
177
        st1=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
178
        st2=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
179
        st3=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
 
180
 
 
181
 
 
182
        //rs1 = st1.executeQuery("SELECT organisationunit.shortname FROM organisationunit where organisationunit.id = "+selectedOrgUnitID);
 
183
        rs1 = st1.executeQuery("SELECT organisationunit.shortname FROM organisationunit where organisationunit.organisationunitid = "+selectedOrgUnitID);        
 
184
        if(rs1.next())    {  selectedOrgUnitName = rs1.getString(1);     }
 
185
        else  {  selectedOrgUnitName = "";           }  
 
186
                
 
187
//      rs2 = st2.executeQuery("select startDate from period where id = "+selectedDataPeriodID);
 
188
//          if(rs2.next())      {       selectedDataPeriodStartDate =  rs2.getDate(1).toString();       }  
 
189
 
 
190
                selectedDataPeriodStartDate = startingDate;
 
191
 
 
192
          } // try block end
 
193
    catch(Exception e)  { out.println(e.getMessage());  }
 
194
 
 
195
    String partsOfDataPeriodStartDate[] = selectedDataPeriodStartDate.split("-");                            
 
196
%>
 
197
 
 
198
<html>
 
199
        <head>
 
200
                <title>MONTHLY STATEMENT SHOWING INSTITUTIONAL CASES AND DEATHS DUE TO PRINCIPAL COMMUNICABLE DISEASES</title>
 
201
        </head>
 
202
        <body>          
 
203
                <center>
 
204
                        <font face="arial" size="3"><b>
 
205
                                <u>MONTHLY STATEMENT SHOWING INSTITUTIONAL CASES AND DEATHS DUE TO PRINCIPAL COMMUNICABLE DISEASES</u>
 
206
                        </b></font>                     
 
207
                </center>
 
208
                <BR>
 
209
                <table cellpadding="0" cellspacing="0" bgcolor="ffffff" align="center" style="border-style:solid; border-width:0; border-collapse: collapse; padding: 0; position:relative; top:10" bordercolor="#ffffff" width="100%"  border="0">
 
210
                        <tr style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding: 0" bordercolor="#111111" width="100%">
 
211
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
212
                                <font face="Arial" size="2">1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of the 
 
213
                    District : &nbsp;&nbsp;</font>
 
214
                        </td>
 
215
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
216
                                <font face="Arial" size="2"><%=selectedOrgUnitName%></font>
 
217
                        </td>   
 
218
                        </tr>
 
219
                        <tr>
 
220
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
221
                                <font face="Arial" size="2">2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Month</font>
 
222
                        </td>
 
223
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
224
                                <font face="Arial" size="2"><%=monthNames[Integer.parseInt(partsOfDataPeriodStartDate[1])]%></font>
 
225
                        </td>   
 
226
                        </tr>
 
227
                        <tr style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding: 0" bordercolor="#111111" width="100%">
 
228
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
229
                                <font face="Arial" size="2">3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Year</font>
 
230
                        </td>
 
231
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
232
                                <font face="Arial" size="2"><%=partsOfDataPeriodStartDate[0]%></font>
 
233
                        </td>   
 
234
                        </tr>
 
235
                        <tr style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding: 0" bordercolor="#111111" width="100%">
 
236
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
237
                                <font face="Arial" size="2">4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total No. of existing Institutions in the District</font>
 
238
                        </td>
 
239
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">&nbsp;</td>   
 
240
                        </tr>
 
241
                        <tr style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding: 0" bordercolor="#111111" width="100%">
 
242
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">
 
243
                                <font face="Arial" size="2">5.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total No. of Reporting Institutions For the month in the District :</font>
 
244
                        </td>
 
245
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">&nbsp;</td>   
 
246
                        </tr>
 
247
                <tr>
 
248
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111" height="25">
 
249
                                <font face="Arial" size="2">6.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Total No. of defaulting Institutions For the month in the District:</font>
 
250
                        </td>
 
251
                        <td width="50%" style="border-collapse: collapse; border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; padding-left:15; padding-right:0; padding-top:0; padding-bottom:0" bordercolor="#111111"  height="25">&nbsp;</td>
 
252
                </tr>                           
 
253
                </table>  
 
254
                <br>
 
255
                <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
 
256
                        <tr>
 
257
                                <td width="3%"  align="center" rowspan="3"><font face="arial" size="2"><b>&#2325;&#2381;&#2352;&#2350; &#2360;&#2306;.</b></font></td>
 
258
                                <td width="40%" align="center"  rowspan="3"><b><font face="arial" size="2">Name of Disease</font></b></td>
 
259
                                <td width="38%" align="center"  colspan="6"><b><font face="arial" size="2">Patients Treated</font></b></td>
 
260
                                <td width="19%" align="center"  colspan="3"><b><font face="arial" size="2">Deaths</font></b></td>
 
261
                        </tr>
 
262
                        <tr>
 
263
                                <td width="12%" align="center"  colspan="2"><b><font face="arial" size="2">OPD</font></b></td>
 
264
                                <td width="12%" align="center"  colspan="2"><b><font face="arial" size="2">IPD</font></b></td>
 
265
                                <td width="14%" align="center"  colspan="2"><b><font face="arial" size="2">TOTAL</font></b></td>
 
266
                                <td width="19%" align="center"  colspan="3"><b><font face="arial" size="2">(IPD Only)</font></b></td>
 
267
                        </tr>
 
268
                        <tr>
 
269
                                <td width="6%" align="center"><b><font face="arial" size="2">M</font></b></td>
 
270
                                <td width="6%" align="center"><b><font face="arial" size="2">F</font></b></td>
 
271
                                <td width="6%" align="center"><b><font face="arial" size="2">M</font></b></td>
 
272
                                <td width="6%" align="center"><b><font face="arial" size="2">F</font></b></td>
 
273
                                <td width="7%" align="center"><b><font face="arial" size="2">M</font></b></td>
 
274
                                <td width="7%" align="center"><b><font face="arial" size="2">F</font></b></td>
 
275
                                <td width="6%" align="center"><b><font face="arial" size="2">M</font></b></td>
 
276
                                <td width="6%" align="center"><b><font face="arial" size="2">F</font></b></td>
 
277
                                <td width="7%" align="center"><b><font face="arial" size="2">T</font></b></td>
 
278
                        </tr>
 
279
                        <%
 
280
                        
 
281
                                try
 
282
                                {
 
283
                                  count = 0;
 
284
                                  int k=0;
 
285
                                  while(count < 18)
 
286
                                   {                               
 
287
                                   
 
288
                                   
 
289
                                                for(i=0;i<6;i++)
 
290
                                                        {                       
 
291
                                                                //rs3 = st3.executeQuery("SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataElement = dataelement.id WHERE datavalue.period  in (select id from period where startdate between '"+startingDate+"' and '"+startingDate+"')  AND datavalue.source ="+selectedOrgUnitID+" AND dataelement.code like '"+monthlyDataElements[k]+"'");
 
292
                                                                rs3 = st3.executeQuery("SELECT sum(datavalue.value) FROM datavalue INNER JOIN dataelement ON datavalue.dataelementid = dataelement.dataelementid WHERE datavalue.periodid  in (select periodid from period where startdate between '"+startingDate+"' and '"+startingDate+"')  AND datavalue.sourceid in (select organisationunitid from organisationunit where parentid in ( select organisationunitid from organisationunit where parentid = "+selectedOrgUnitID+") or organisationunitid in (select organisationunitid from organisationunit where parentid = "+selectedOrgUnitID+") or organisationunitid = "+selectedOrgUnitID+") AND dataelement.code like '"+monthlyDataElements[k]+"'");                                                                                
 
293
                                                                if(!rs3.next())  {  tempval[i] = 0;      }
 
294
                                                                else   {  tempval[i] = rs3.getInt(1);  }
 
295
                                                                total[i] += tempval[i];
 
296
                                                                k++;
 
297
                                                        } // for loop end       
 
298
                                                                                                                                     
 
299
                                        %>
 
300
                                     
 
301
                                        <tr>
 
302
                                                <td width="3%" align="center"><font face="arial" size="2"><%=nonCommDisNo[count]%></font>&nbsp;</td>
 
303
                                                        <td width="40%" align="center"><font face="arial" size="2"><%=nonCommDisNames[count]%></font>&nbsp;</td>
 
304
                                                <td width="6%" align="center"><font face="arial" size="2"><%=tempval[0]%></font>&nbsp;</td>
 
305
                                                <td width="6%" align="center"><font face="arial" size="2"><%=tempval[1]%></font>&nbsp;</td>
 
306
                                                <td width="6%" align="center"><font face="arial" size="2"><%=tempval[2]%></font>&nbsp;</td>
 
307
                                                <td width="6%" align="center"><font face="arial" size="2"><%=tempval[3]%></font>&nbsp;</td>
 
308
                                                <td width="7%" align="center"><font face="arial" size="2"><%=(tempval[0]+tempval[2])%></font>&nbsp;</td>
 
309
                                                <td width="7%" align="center"><font face="arial" size="2"><%=(tempval[1]+tempval[3])%></font>&nbsp;</td>
 
310
                                                <td width="6%" align="center"><font face="arial" size="2"><%=tempval[4]%></font>&nbsp;</td>
 
311
                                                <td width="6%" align="center"><font face="arial" size="2"><%=tempval[5]%></font>&nbsp;</td>
 
312
                                                <td width="7%" align="center"><font face="arial" size="2"><%=(tempval[4]+tempval[5])%></font>&nbsp;</td>
 
313
                                                </tr>                                
 
314
                                     
 
315
                                        
 
316
                                     <%                                                                                 
 
317
                                 count++;
 
318
                                   } // while loop end
 
319
                          } // try block end
 
320
                        catch(Exception e)  { out.println(e.getMessage());  }
 
321
                finally
 
322
                 {
 
323
                                try
 
324
                                 {
 
325
                                        if(rs1!=null)  rs1.close();             if(st1!=null)  st1.close();
 
326
                                        if(rs2!=null)  rs2.close();             if(st2!=null)  st2.close();
 
327
                                        if(rs3!=null)  rs3.close();             if(st3!=null)  st3.close();                                     
 
328
                                        
 
329
                                        if(con!=null)  con.close();
 
330
                                 }
 
331
                                catch(Exception e)   {  out.println(e.getMessage());   }
 
332
                 } // finally block end                                 
 
333
                %>
 
334
                
 
335
                <tr>
 
336
                                <td width="43%" align="center" colspan="2"><font face="arial" size="2">Total</font></td>
 
337
                                <td width="6%" align="center" ><font face="arial" size="2"><%=total[0]%></font>&nbsp;</td>
 
338
                                <td width="6%" align="center" ><font face="arial" size="2"><%=total[1]%></font>&nbsp;</td>
 
339
                                <td width="6%" align="center" ><font face="arial" size="2"><%=total[2]%></font>&nbsp;</td>
 
340
                                <td width="6%" align="center" ><font face="arial" size="2"><%=total[3]%></font>&nbsp;</td>
 
341
                                <td width="7%" align="center" ><font face="arial" size="2"><%=(total[0]+total[2])%></font>&nbsp;</td>
 
342
                                <td width="7%" align="center" ><font face="arial" size="2"><%=(total[1]+total[3])%></font>&nbsp;</td>
 
343
                                <td width="6%" align="center" ><font face="arial" size="2"><%=total[4]%></font>&nbsp;</td>
 
344
                                <td width="6%" align="center" ><font face="arial" size="2"><%=total[5]%></font>&nbsp;</td>
 
345
                                <td width="7%" align="center" ><font face="arial" size="2"><%=(total[4]+total[5])%></font>&nbsp;</td>
 
346
                        </tr>                                                                           
 
347
                </table>
 
348
        </body>
 
349
</html>
 
 
b'\\ No newline at end of file'