Sean ORegan


We have a parameter-driven OLAP report running inside a ReportViewer in an ASP.NET application. It runs very slowly, but you run the MDX directly against the cube (replacing parameters with actual values) it works fine.

The problem is an inherent inefficiency with the StrToMember function in the MDX. To get round this we would like to find a way of programmatically collecting the parameter from the user, building the MDX query in code and passing it to the report.

Is it possible to pass a pre-built MDX string to a ReportViewer which can then be used as the querystring for the dataset

Thanks in advance.





Re: Passing MDX queries to ReportViewer reports

Annapurni


Create a report parameter CompleteMDX

To begin with, you will need to assign the MDX, design the report with the appropriate rows and columns and then substitute the MDX with a dynamic query. In the dataset underlying your report, use CommandType=text and in the query string use the evaluate syntax.

=Parameters!CompleteMDX.

When accessing the ReportViewer, you can pass the entire MDX (as an escaped string) as the parameter. For instance,

http://YourReportServer/Reportserver/Pages/ReportViewer.aspx /FolderName/ReportName&CompleteMDX=mdxQuery






Re: Passing MDX queries to ReportViewer reports

GopinathK

I converted RDL into RDLC for my web application to view the report in report viewer. In that RDL i am using SSAS Cube as a Data source. But in the RDLC there is no option to connect the data source with SSAS Cube using SQLDataSouce. Please help me regarding this as soon as possible. Thanks in advance.