Basic interface for ad hoc queries


Mondrian Version : mondrian-

This sample shows the various mdx queries which can be selected and executed against MDXQueryServlet servlet, and give the result as a simple formatted table.


Prerequisites Articles

File Configuration

Open and edit web.xml file - which should be located in your [TOMCAT_HOME]/webapps/mondrian/WEB-INF folder - with your favorite text editor,  and find connectString context parameter with these following configurations :



Note : [TOMCAT_HOME] is the folder where your Apache Tomcat installed. For example : C:\apache-tomcat-6.0.16


Open your Mondrian web application and click on the eight sample from the index page (Basic interface for ad hoc queries). You should see an OLAP data table with a JPivot toolbar. Drill through some of the dimension level nodes.

For example, my web application is located at http://localhost:8080/mondrian and my "Basic interface for ad hoc queries" sample url is http://localhost:8080/mondrian/adhoc.jsp.

  • You will see some queries list from a drop down combo. Select one of them.. for example I choose "Sample Query #2"

  • Click on "show query" button. The MDX query will be shown in textarea below the button

  • Click on "process MDX query" button to execute the query shown and you should see some results below the button momentarily

  • Done

You should try to execute another queries and see the results as your insights on Mondrian's MDX behaviours.

Still Getting Errors ?

If you already following all the instructions and still got some errors or you have other issues that has to do with other database sources then you can post your problem to our Mondrian user group at Or you can send a blank email to to join the group. 

Note that you must get approval first before you can post.

Mondrian Training

For those of you  in Indonesia we have a regular training on OLAP and data warehousing subject using Pentaho Data Integration and Mondrian.

If you want to enroll for the session please feel the form at and we will send you the training schedule.

And for those who like to have a remote training instead using Webex please contact us by email to