Hello,
I'm trying to set the datasource in the code behind instead of the xaml. I would like to add keys to my silverlight config file to define which serveruri, database, and cube to load the grid with. Do you have an example of setting the datasource before the xaml loads?
I thought it would be as simple as doing this in my constructor:
Uri
uri = new Uri(http://sampledata.infragistics.com/olap/msmdpump.dll);
XmlaDataSource
olapsource = new XmlaDataSource { ServerUri = uri };
pivotGrid.DataSource = olapsource;
Hi
You can use the follow code:
XmlaConnectionSettings connectionSettings = new XmlaConnectionSettings();connectionSettings.ServerUri = new Uri"http://igbgsofsltest/olap/msmdpump.dll");XmlaConnection xmlaConnection = new XmlaConnection(connectionSettings);XmlaDataProvider xmlaDataProvider = new XmlaDataProvider(xmlaConnection);XmlaDataSource xmlaDataSource = new XmlaDataSource(xmlaDataProvider);xmlaDataSource.Database = XmlaDataSource.GenerateInitialDatabase("Adventure Works DW 2008");
Hi Todor,
Your code is working when i set http://localhost/olap/msmdpump.dll but not when i set
http://<my_Server>/olap/msmdpump.dll
When set the same URL directly in SQL Server management studio , it works ?
An Idea ?
Thans in advance for the reply.
Christopphe
Hi,
May be this post will help you. Look at the part of clientaccesspolicy.xml file.
Regards,Todor