What is the way to retrieve translations from a cube in SSAS and switch between different languages in a xamPivotGrid?
Hi,
The pivot grid has StringSetting property which exposes the strings used in the control. You can set all its properties to translate the control according you needs. Below is example how to set one of these properties.
PivotGrid.StringSetting.EmptyColumnsAreaText = "Empty column text";
Regards
my need is to retrieve from the SSAS the cubes translations of Dimensions names, attributes, measures etc
To get translations from cube you need to specify locale identifier in connection to the server. Below is example how to do that
<olap:XmlaConnectionSettings x:Key="xmlaSettings" ServerUri="[Specify your server URI here]"> <olap:XmlaConnectionSettings.DiscoverProperties> <olap:XmlaQueryProperty PropertyName="LocaleIdentifier" Value="[Your LCID]"/> </olap:XmlaConnectionSettings.DiscoverProperties> <olap:XmlaConnectionSettings.ExecuteProperties> <olap:XmlaQueryProperty PropertyName="LocaleIdentifier" Value="[Your LCID]"/> </olap:XmlaConnectionSettings.ExecuteProperties></olap:XmlaConnectionSettings>
<olap:XmlaDataSource x:Key="pivotGridDataSource" … ConnectionSettings="{StaticResource xmlaSettings }"></olap:XmlaDataSource>
BTW using the code above you can set any property in connection string that are used for connection to the server Regards Todor
BTW using the code above you can set any property in connection string that are used for connection to the server
Hi Petar,
So how would you accomplish this in code (C#), not xaml?
I have this in my code-behind:
_serverUri = new Uri(this._serverUriAddress, UriKind.Absolute);
this._xmlaDataSource = new XmlaDataSource { ServerUri = _serverUri };
but can't find anything for DiscoverProperties, or ExecuteProperties.
Thanks.
Hi
You can use code below
XmlaConnectionSettings connSett = new XmlaConnectionSettings(); connSett.DiscoverProperties.Add(new XmlaQueryProperty("key","value")); connSett.ExecuteProperties.Add(new XmlaQueryProperty("key","value")); XmlaDataSource ds = new XmlaDataSource(); ds.ConnectionSettings = connSett;
Todor