Jump to content
Changes to the Jaspersoft community edition download ×

iReport with Mondrian OLAP connection


Recommended Posts



i have a report with mondrian connection, this connection is well built (i have made the test and it returns "connection test succesfully")


when i run the report, ireport shows the next error:



OpeningÂMondrianÂconnection ClosingÂMondrianÂconnection net.sf.jasperreports.engine.JRRuntimeException:ÂIncorrectÂdataÂmapping:ÂtheÂnumberÂofÂpositionsÂdoesn'tÂmatchÂtheÂnumberÂofÂaxes. ÂÂÂÂatÂnet.sf.jasperreports.olap.JRMondrianDataSource$DataFieldMatcher.<init>(JRMondrianDataSource.java:477) ÂÂÂÂatÂnet.sf.jasperreports.olap.JRMondrianDataSource.createFieldMatcher(JRMondrianDataSource.java:287) ÂÂÂÂatÂnet.sf.jasperreports.olap.JRMondrianDataSource.init(JRMondrianDataSource.java:255) ÂÂÂÂatÂnet.sf.jasperreports.olap.JRMondrianDataSource.<init>(JRMondrianDataSource.java:115) ÂÂÂÂatÂnet.sf.jasperreports.olap.JRMondrianQueryExecuter.createDatasource(JRMondrianQueryExecuter.java:84) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:662) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setDatasource(JRFillDataset.java:606) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:595) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:123) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:420) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:256) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:829) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource)


can anybody help me, please???

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks Lucian.


I have one more question. If i have the previous mdx:


select {[Measures].[unit Sales]} on columns,


{([Product].[All Products] ) } on rows


from Sales



I want to show all data, and the values of the dimensions, etc. I want to say that i want to show all data that we would see in the cube.


What fields i need to create?

Link to comment
Share on other sites

You can't use this query to display "all the data in the cube", since the query result cube consists of a single element. You would need a query like

select {[Measures].[unit Sales]} on columns,
[Product].members on rows
from Sales


Using this query, you can map fields to dimension values, e.g. Rows[Product][Product Category].


You can check the "mondrian" sample in the JasperReports distribution, it contains a couple of MDX reports.




Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...