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