<%@ page language="java" %>
<%--
// $Id: //guest/paul_dymecki/mondrian/webapp/taglib.jsp#1 $
// This software is subject to the terms of the Common Public License
// Agreement, available at the following URL:
// http://www.opensource.org/licenses/cpl.html.
// (C) Copyright 2002 Kana Software, Inc. and others.
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
//
// Andreas Voss, 27 March, 2002
--%>
<%@ taglib uri="/WEB-INF/mdxtable.tld" prefix="mdx" %>
<html>
<head>
<title>Mondrian MDX Table Taglib Demo</title>
</head>
<body>
<mdx:query name="query1" resultCache="true">
select
{[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} on columns,
CrossJoin(
{ [Promotion Media].[All Promotion Media].[Radio],
[Promotion Media].[All Promotion Media].[TV],
[Promotion Media].[All Promotion Media].[Sunday Paper],
[Promotion Media].[All Promotion Media].[Street Handout] },
[Product].[All Products].[Drink].children) on rows
from Sales
where ([Time].[1997])
</mdx:query>
<mdx:query name="query2" resultCache="true">
select
[Product].[All Products].[Drink].children on rows,
CrossJoin(
{[Measures].[Unit Sales], [Measures].[Store Sales]},
{ [Promotion Media].[All Promotion Media].[Radio],
[Promotion Media].[All Promotion Media].[TV],
[Promotion Media].[All Promotion Media].[Sunday Paper],
[Promotion Media].[All Promotion Media].[Street Handout] }
) on columns
from Sales
where ([Time].[1997])
</mdx:query>
<mdx:query name="query3" resultCache="true">
select
{[Measures].[Unit Sales], [Measures].[Store Sales]} on columns,
Order([Product].[Product Department].members, [Measures].[Store Sales], DESC) on rows
from Sales
</mdx:query>
<mdx:query name="query4" resultCache="true">
select
[Product].[All Products].[Drink].children on columns
from Sales
where ([Measures].[Unit Sales], [Promotion Media].[All Promotion Media].[Street Handout], [Time].[1997])
</mdx:query>
<mdx:query name="query5" resultCache="true">
select
NON EMPTY CrossJoin([Product].[All Products].[Drink].children, [Customers].[All Customers].[USA].[WA].Children) on rows,
CrossJoin(
{[Measures].[Unit Sales], [Measures].[Store Sales]},
{ [Promotion Media].[All Promotion Media].[Radio],
[Promotion Media].[All Promotion Media].[TV],
[Promotion Media].[All Promotion Media].[Sunday Paper],
[Promotion Media].[All Promotion Media].[Street Handout] }
) on columns
from Sales
where ([Time].[1997])
</mdx:query>
<mdx:query name="query6" resultCache="true">
select from Sales
where ([Measures].[Store Sales], [Time].[1997], [Promotion Media].[All Promotion Media].[TV])
</mdx:query>
<h1>Mondrian Taglib Examples</h1>
<h3>CrossJoin Example 1</h3>
The current slicer is <strong><mdx:transform query="query1" xsltURI="/WEB-INF/mdxslicer.xsl" xsltCache="true"/></strong>.
<p>
<mdx:transform query="query1" xsltURI="/WEB-INF/mdxtable.xsl" xsltCache="false"/>
<h3>CrossJoin Example 2</h3>
The same thing the other way round. The current slicer is <strong><mdx:transform query="query2" xsltURI="/WEB-INF/mdxslicer.xsl" xsltCache="true"/></strong>.
<p>
<mdx:transform query="query2" xsltURI="/WEB-INF/mdxtable.xsl" xsltCache="false"/>
<h3>Simple Table</h3>
<mdx:transform query="query3" xsltURI="/WEB-INF/mdxtable.xsl" xsltCache="false"/>
<p>
<h3>1-dim Table</h3>
A One dimensional table. Slicer is
<strong>"<mdx:transform query="query4" xsltURI="/WEB-INF/mdxslicer.xsl" xsltCache="false"/>"</strong>
<p>
<mdx:transform query="query4" xsltURI="/WEB-INF/mdxtable.xsl" xsltCache="false"/>
<h3>CrossJoin on both axes</h3>
Here is the slicer: <strong>"<mdx:transform query="query5" xsltURI="/WEB-INF/mdxslicer.xsl" xsltCache="false"/>"</strong>
<p>
<mdx:transform query="query5" xsltURI="/WEB-INF/mdxtable.xsl" xsltCache="false"/>
<h3>0-dim example</h3>
0-dim "tables" may be useful, if you want to display calculated numbers in a form or
text. For example, the Store Sales were
<mdx:transform query="query6" xsltURI="/WEB-INF/mdxvalue.xsl" xsltCache="false"/>
in 1997 for TV promoted products.
<p>
</body>
</head>
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 1820 | Paul Robert Dymecki | mondrian: Integrate latest from //guest/julian_hyde | ||
| //guest/julian_hyde/mondrian/webapp/taglib.jsp | |||||
| #1 | 1603 | Julian Hyde |
mondrian: Add Andreas' taglib; Rename 'mondrian.rolap.Util.assert' to 'assertTrue', because 'assert' is a keyword in jdk 1.4; Fix 'NON EMPTY'; JUnit framework for tests; Add Oracle dataset. |
||