Friday, March 23, 2012

Getting Server name for Analysis Services 2005 Cube for use in SQL Reporting Services

Hi

We have been struggling getting the Servername to include on a SQL Reporting Services report. The Reporting server and the Analysis Services cube will not be on the same server, so the ReportURL option is not of much use to us. Is there any way of getting the servername where the cube is through a MDX Query. If this is not possible any other suggestions.

Andre

I am not sure I understand your scenario. The server name is specified in the data source. What exactly are you trying to do and what's ReportURL option?|||

I will try to make it clearer.

Our datasource for Reporting services is an Analysis Services Cube. We want to get the servername of the datasouce (or cube) and use it in the report - in a textbox which is part of a table or Matrix. Note the reporting server and Cube may or may not be on the same server as we are rolling this out to a variety of clients.

How do we retrieve the actual servername itself to use in the report. 2 of us have been searching and have not come up with anything as yet.

Andre

|||

Not that easy. Two options come to mind:

1. Use an expression-based connection string (works with a private data sources only) and store the server name in the Report Server web.config file. This sample demonstrates this scenario.

2. Write .NET code in an exernal assembly that retrieves the data source info for the report by calling GetDataSourceContents API.

No comments:

Post a Comment