MDX query from PHP

丶灬走出姿态 提交于 2019-12-24 09:27:43

问题


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.


回答1:


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.




回答2:


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! :)



来源:https://stackoverflow.com/questions/7931616/mdx-query-from-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!