MDX query from PHP

2019-08-02 06:47发布

Is it possible to create an MDX query for JasperServer using PHP as a host language, given that my underlying relational database is MySQL?

What I would like to do is send the query to JasperServer in order to create an OLAP View and receive the view as a result (preferably in some text-based format, as oposed to an image or PDF).

I'm using JasperServer CE 4.2.1.

As a side note, is it even correct to think about making MDX queries from you application, just like you would make SQL queries? If yes, is there any way to make MDX queries to any OLAP server using PHP?

Edit: Added missing information: I'm using MySQL as a relational database server.

2条回答
冷血范
2楼-- · 2019-08-02 07:03

It's very likely your OLAP server supports XMLA. And XMLA is not more than SOAP with a specific format. I don't know a php library supporting XMLA, so you'll have to go the hard way :

The big job is marshalling/unmarshalling the XML -> The standard is defined by Microsoft and followed by almost all other vendors -> http://msdn.microsoft.com/en-us/library/ms187178%28v=sql.90%29.aspx

Maybe you can oversimplify for your needs.

查看更多
霸刀☆藐视天下
3楼-- · 2019-08-02 07:08

It looks like an issue to Jasper's TechSupport, but I think than you could use the OpenRowSet of SQLServer passing the parameter to the ConnectionString "PROVIDER=MSOLAP;Data Source=...etc."... good luck! :)

查看更多
登录 后发表回答