StyleMetaData GetStyle(string mon)
mon. Moniker containing information about the table area, which formatting should be obtained.
The GetStyle operation gets formatting style for the specified table area displaying an analytical data area.
To execute the operation, in the mon field specify regular report instance moniker with the following postfix: !DataArea!DataSources!<data source key>!DataSourceSlices!<slice key>!Views!<table key>!EaxTableStyle!.
This moniker should also be appended with one of the following values:
Internal - to get data area formatting.
Top - to get column headers formatting.
Left - to get row headers formatting.
The moniker can be obtained on executing the OpenPrxMeta operation.
The operation returns formatting of the specified table area.
Below is the example of getting formatting of table row headers. The request contains table area moniker. The response contains the obtained formatting.
{
"GetStyle" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Views!3!EaxTableStyle!Left"
}
}
{
"GetStyleResult" :
{
"style" :
{
"Text" :
{
"@VA" : "1",
"@HA" : "1",
"@M" : "7px 6px 8px 6px",
"@WW" : "1"
},
"NumberFormat" :
{
"@F" : "",
"@FT" : "0"
},
"Font" :
{
"@B" : "false",
"@S" : "8",
"@F" : "Arial",
"@H" : "12"
},
"Borders" : "",
"Hyperlink" : ""
}
}
}
public static StyleMetaData GetSpecificRangetyle(string moniker, ulong sourceKey, ulong sliceKey, ulong viewKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetStyle()
{
mon = moniker + "!DataArea!DataSources!" + sourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Views!" + viewKey.ToString() + "!EaxTableStyle!Left"
};
//Get style
var result = somClient.GetStyle(tGet);
return result;
}
See also: