bool SetPrxMeta(string mon, PrxMetaArg tArg)
mon. Moniker of opened regular report instance.
tArg. Operation execution parameters.
The SetPrxMeta operation changes regular report metadata.
The operation changes settings of various regular report elements. To execute the operation, in the mon field specify moniker of opened regular report instance, and in the tArg field specify the fields, which values should be changed.
The moniker can be obtained on executing the OpenPrxMeta operation. The regular report should be opened for edit.
In the tArg.meta field specify the fields, which should be changed. The elements, which should be changed, must have the key (the k field) defined.
The operation returns True if changes were applied successfully.
To save changes, use the SaveObject or SaveObjectAs operations.
Below is the example of renaming regular report sheet. The request contains moniker of opened regular report instance, sheet key, and a new sheet name. The response indicates whether changes are applied successfully.
{
"SetPrxMeta" :
{
"mon" : "S1!M!S!P1",
"tArg" :
{
"meta" :
{
"sheets" :
{
"its" :
{
"it" :
[
{
"k" : "1",
"n" : "Data"
}
]
}
}
}
}
}
}
{
"SetPrxMetaResult" : "1"
}
public static bool SetPrxSheets(string moniker, string newSheetName)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetPrxMeta()
{
tArg = new PrxMetaArg()
{
meta = new PrxMetaData()
{
sheets = new PrxMetaSheets()
{
its = new PrxMetaSheet[1]
{
new PrxMetaSheet() { k = 1, n = newSheetName}
}
}
}
},
mon = moniker
};
//Change sheet parameters
var result = somClient.SetPrxMeta(tSet);
return result;
}
See also: