Changeset 1728 for extensions/net.sf.basedb.reggie/trunk
- Timestamp:
- Oct 23, 2012, 9:21:24 AM (11 years ago)
- Location:
- extensions/net.sf.basedb.reggie/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/net.sf.basedb.reggie/trunk/resources/samplereportgenerator.jsp
r1727 r1728 131 131 frm.fromdate.disabled = true; 132 132 frm.todate.disabled = true; 133 frm.viewtype.disabled = true; 133 134 Main.hide('gocreate'); 134 135 Main.show('reportSection'); … … 140 141 if (frm.fromdate.value != null) url += '&fdate='+frm.fromdate.value; 141 142 if (frm.todate.value != null) url += '&tdate='+frm.todate.value; 143 if (frm.viewtype.value != null) url += '&vtype='+frm.viewtype.value; 142 144 } 143 145 var request = Ajax.getXmlHttpRequest(); … … 351 353 if (sitesCombined[key] != '') gt += sitesCombined[key]; 352 354 } 353 sitesCombinedRow.appendChild(getTableCellElement(gt, 'colsummary'));355 sitesCombinedRow.appendChild(getTableCellElement(gt, 'colsummary')); 354 356 reportTable.appendChild(sitesCombinedRow); 355 357 … … 524 526 tableRow.appendChild(tableCol); 525 527 tableRow.appendChild(getTableCellElement(year+'-'+(month)+'-'+date, 'reportdata')); 526 var grandTotal = 0; 528 var grandTotal = 0; 527 529 var currentDate = new Date(periodStartDate.getFullYear(), periodStartDate.getMonth(), periodStartDate.getDate()); 528 530 var columnCounter = 0; … … 747 749 <span id="displayInterval.message" class="message" style="display: none;"></span> 748 750 Define which period the report should cover. Empty fields will include all tubes.<br> 749 The report will adjust itself depending on the size of the period. 751 </td> 752 </tr> 753 <tr> 754 <td valign="top" class="prompt">View type</td> 755 <td valign="top" class="input"> 756 <select name="viewtype"> 757 <option value="AUTO" selected="yes">Auto</option> 758 <option value="WEEK">Week</option> 759 <option value="MONTH">Month</option> 760 <option value="QUARTER">Quarter</option> 761 <option value="YEAR">Year</option> 762 </select> 763 </td> 764 <td valign="top" class="status" id="displayViewType.status"></td> 765 <td class="help"> 766 <span id="displayViewType.message" class="message" style="display: none;"></span> 767 Auto will adjust the report depending on the size of the period. 750 768 <ul> 751 769 <li>Period shorter then 3 months - specimens per week</li> -
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SampleReportServlet.java
r1727 r1728 80 80 Date endDate = Reggie.CONVERTER_STRING_TO_DATE.convert(endDateParameter); 81 81 82 String viewType = null; 83 String viewTypeParameter = Values.getString(req.getParameter("vtype"), null); 84 if (viewTypeParameter != null && !viewTypeParameter.equals("AUTO")) 85 { 86 viewType = viewTypeParameter; 87 } 88 82 89 //List<Restriction> restrictions = new ArrayList<Restriction>(); 83 90 ItemQuery<Sample> sampleQuery = Sample.getQuery(); … … 118 125 Date latestDate = null; 119 126 JSONObject jsonSitesCombined = new JSONObject(); 120 String viewType = null;121 127 JSONObject jsonStatistics = new JSONObject(); 122 128 while (sampleIterator.hasNext())
Note: See TracChangeset
for help on using the changeset viewer.