sergiomaky Posted September 22, 2006 Share Posted September 22, 2006 hello: 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: ErrorÂfillingÂprint... 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 More sharing options...
lucianc Posted September 22, 2006 Share Posted September 22, 2006 This error is caused by field mappings inconsistent with the MDX query: a data/cell mapping specifies axis positions but the number of positions doesn't match the number of axes of the query result cube. HTH,Lucian Link to comment Share on other sites More sharing options...
vgarcia Posted September 22, 2006 Share Posted September 22, 2006 Hi Lucianc, If i have the mdx: select {[Measures].[unit Sales]} on columns,{([Product].[All Products] ) } on rows from Sales How should be the expression of the field? Thanks in advance. Link to comment Share on other sites More sharing options...
lucianc Posted September 22, 2006 Share Posted September 22, 2006 You can use the following mapping for a data field:Data([Measures].[unit Sales],?) Or, since you have only one measure on the column axis, you can also simply use Data as the field mapping. HTH,Lucian Link to comment Share on other sites More sharing options...
vgarcia Posted September 25, 2006 Share Posted September 25, 2006 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 More sharing options...
lucianc Posted September 26, 2006 Share Posted September 26, 2006 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 likeCode:select {[Measures].[unit Sales]} on columns,[Product].members on rowsfrom 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. HTH,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now