Project

General

Profile

« Previous | Next » 

Revision 4896

use "recordNum" rather than "studentId"

View differences:

download.jsp
55 55
		return params;
56 56
	}
57 57
%><%!
58
	private List processResultsSet(ResultSet rs, int omitColumn) throws SQLException {
58
	private List processResultsSet(ResultSet rs, int omitColumn, String omitColumnLabel) throws SQLException {
59 59
		List retTable = new ArrayList();
60 60
		int colCount = rs.getMetaData().getColumnCount();
61 61
		List columnHeaders = new ArrayList();
......
66 66
			List row = new ArrayList();
67 67
			//get the values for this row
68 68
			for (int i = 1; i <= colCount; i++) {
69
				if (recordCount == 1) {
70
					String colName = rs.getMetaData().getColumnName(i);
71
					columnHeaders.add(colName);
72
				}
73
				
69

  
70
				String colName = rs.getMetaData().getColumnName(i);
74 71
				String value = rs.getString(i);
75 72
					
76 73
				//clean up the value
......
84 81
					}
85 82
					uniqueIds.put(value, lookupValue);
86 83
					value = lookupValue;
84
					colName = omitColumnLabel;
87 85
				}
86
				if (recordCount == 1) {
87
					columnHeaders.add(colName);
88
				}
88 89
				
89 90
				row.add(value);
90 91
			}
......
416 417
					List transposedTable = transpose(rs, observation, pivot, pivotCols, true);
417 418
					csv.writeAll(transposedTable);
418 419
				} else {
419
					List processedTable = processResultsSet(rs, 3);
420
					List processedTable = processResultsSet(rs, 3, "recordNum");
420 421
					csv.writeAll(processedTable);
421 422
				}
422 423
				

Also available in: Unified diff