Jump to content
Changes to the Jaspersoft community edition download ×

JasperReport xmla report problems


mszalay

Recommended Posts

Hi

 

i try to run a report using a xmla datasource. The report was designed by iReport and works there.

 

If I want to execute the report programmatically, I got the following problems:

 

1) I had to change the <queryString language="mdx"> from xmla-mdx to mdx

 

2) the report does not work (jasperreport cannot map my fields):

 

net.sf.jasperreports.engine.JRRuntimeException: Invalid field mapping "[Date].[Date_Year].[All]".

at net.sf.jasperreports.olap.JROlapDataSource.init(JROlapDataSource.java:248)

at net.sf.jasperreports.olap.JROlapDataSource.<init>(JROlapDataSource.java:113)

at net.sf.jasperreports.olap.xmla.JRXmlaQueryExecuter.createDatasource(JRXmlaQueryExecuter.java:122)

 

..is the example for a field with description Date].[Date_Year].[All].

 

any hints how to solve this problems?

 

thanks a lot

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

I managed to solve the first problem by putting the following line before compiling the report:

 

JRProperties.setProperty("net.sf.jasperreports.query.executer.factory.xmla-mdx", "net.sf.jasperreports.olap.xmla.JRXmlaQueryExecuterFactory");

 

 

Additional information to the second problem: the parser gets a

"line 1:1: unexpected token:" for each field in the report.

 

Anyone an idea?

 

Thanks.

Link to comment
Share on other sites

I got the solution. The property has to look like this:

 

JRProperties.setProperty("net.sf.jasperreports.query.executer.factory.xmla-mdx", "net.sf.jasperreports.engine.query.JRXmlaQueryExecuterFactory");

 

The confusing thing is: this class is not delivered with jasperreports, but with ireport (jar file: cincom-jr-xmla.jar).

 

I'm using jasperreports 1.3.3.

 

Now it works.

 

Regards Michael

Link to comment
Share on other sites

I see, you got XMLA connection with iReport? please, could you tell me, what did you write in the field "URL of XMLA Server"? I have to connect to SQL Server Analysis Service. And I can't find: HOW? Do you know something about this problem?
Link to comment
Share on other sites

hi again!:)

my connection almost works. Datasource appeared. But there isn't "Catalog" and "Cube". On my server they are, I deployed my cude and processed. Can somebody tell me, why they didn't appear after my click "Get metadata"?

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...