IntroductionIf you use JPivot as an interface for Mondrian, you can specify cube configuration in <jp:mondrianQuery> tag and your MDX (Multidimension Expression) query inside the tag.This wiki article will show you example for that. Database and Cube ReferenceJPivot mondrianQuery tags has 15 attributes you can configured with. The detailed descriptions for each attribute can be found in JPivot's reference page.Two attributes that are required are :
Example usage for this tag is like below : The blue text is your mondrianQuery tag configuration and the green one is for your MDX query. In this sample I have a query id query01 in my cube's catalog /WEB-INF/queries/FoodMart.xml. I also specify MySQL configuration in two attributes, a jdbc class (com.mysql.jdbc.Driver) and a connection string (jdbc:mysql://localhost/foodmart?user=root&password=). We also have an mdx query inside the tag which returned 2 dimensions (Media and Product) in rows and 3 measures (Unit Sales, Store Cost, and Store Sales) in columns from Sales cube. Try to edit mondrianQuery tag in other jsp sample files bundled with Mondrian distribution and see what effect it has on the files :
|
Mondrian >