You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
143 lines
2.9 KiB
143 lines
2.9 KiB
<%@page contentType="text/html"%> |
|
<%-- |
|
// This software is subject to the terms of the Eclipse Public License v1.0 |
|
// Agreement, available at the following URL: |
|
// http://www.eclipse.org/legal/epl-v10.html. |
|
// You must accept the terms of that agreement to use this software. |
|
// |
|
// Copyright (C) 2001-2005 Julian Hyde and others |
|
// All Rights Reserved. |
|
// |
|
// jhyde, 6 August, 2001 |
|
--%> |
|
<% |
|
final String nl = System.getProperty("line.separator"); |
|
String[] queries = new String[] { |
|
// #0 |
|
"SELECT" + nl + |
|
" NON EMPTY {Hierarchize({[Measures].[Anzahl]})} ON COLUMNS," + nl + |
|
" NON EMPTY {Hierarchize({[Geschlecht].[Geschlecht].Members})} ON ROWS" + nl + |
|
" FROM [Studierende]" |
|
}; |
|
%> |
|
|
|
<html> |
|
<head> |
|
<style> |
|
.{ |
|
font-family:"verdana"; |
|
} |
|
|
|
.resulttable { |
|
background-color:#AAAAAA; |
|
} |
|
|
|
.slicer { |
|
background-color:#DDDDDD; |
|
font-size:10pt; |
|
} |
|
|
|
.columnheading { |
|
background-color:#DDDDDD; |
|
font-size:10pt; |
|
} |
|
|
|
.rowheading { |
|
background-color:#DDDDDD; |
|
font-size:10pt; |
|
} |
|
|
|
.cell { |
|
font-family:"courier"; |
|
background-color:#FFFFFF; |
|
font-size:10pt; |
|
text-align:right; |
|
} |
|
|
|
</style> |
|
|
|
<title>JSP Page</title> |
|
</head> |
|
<body> |
|
|
|
<a href=".">back to index</a><p/> |
|
|
|
<form action="adhoc.jsp" method="post"> |
|
<table> |
|
<tr> |
|
<td> |
|
<select name="whichquery"> |
|
<% |
|
|
|
for (int i=0; i<queries.length; i++) { |
|
|
|
%> |
|
<option |
|
<% |
|
|
|
if (request.getParameter("whichquery") != null) { |
|
if (Integer.valueOf(request.getParameter("whichquery")).intValue() == i) { |
|
out.print(" selected"); |
|
} |
|
} |
|
%> |
|
|
|
value="<% out.print(i);%>">Sample Query #<%out.print(i); |
|
|
|
%> |
|
|
|
</option> |
|
|
|
<% |
|
} |
|
%> |
|
|
|
</select> |
|
</td> |
|
</tr> |
|
|
|
<tr> |
|
<td> |
|
<input type="submit" value="show query"> |
|
</td> |
|
</tr> |
|
</table> |
|
</form> |
|
|
|
<form action="mdxquery"> |
|
<table> |
|
<tr> |
|
<td> |
|
<tr> |
|
<td> |
|
<textarea id='queryArea' name="queryString" rows=10 cols=80><% |
|
if (request.getParameter("whichquery") != null) { |
|
out.println(queries[Integer.valueOf(request.getParameter("whichquery")).intValue()]); |
|
} |
|
if (request.getParameter("queryString") != null) { |
|
out.println(request.getParameter("queryString")); |
|
} |
|
%></textarea> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
<input type="submit" value="process MDX query"> |
|
</td> |
|
</tr> |
|
|
|
<% if (request.getAttribute("result") != null) { %> |
|
<tr> |
|
<td valign=top>Results: |
|
<% out.println(request.getAttribute("result")); %> |
|
</td> |
|
</tr> |
|
<% } %> |
|
|
|
</table> |
|
</form> |
|
|
|
<a href=".">back to index</a><p/> |
|
|
|
</body> |
|
</html>
|
|
|