SetPrxShape

Syntax

bool SetPrxShape(PrxShapeId shapeMon, PrxShapeParams tArg)

Parameters

shapeMon. Shape moniker.

tArg. Operation execution parameters.

Description

The SetPrxShape operation changes settings of the shape located on a regular report sheet.

Comments

To execute the operation, in the shapeMon field specify shape moniker and in the tArg field specify determined settings. The moniker can be created based on the regular report moniker according to the rule: Regular report instance moniker!Sheets!sheet key!Objects!shape identifier.

The operation results in the logical True if the settings were changed successfully.

Example

Below is the example of changing settings of the shape located on a regular report sheet. The request contains shape moniker and background, border, and text gradient fill parameters to be set. The response contains whether settings were changed successfully.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetPrxShape xmlns="http://www.fsight.ru/PP.SOM.Som">
<shapeMon xmlns="">
  <id>NIOJJPAOELHBGOAEEIPNMJOEPPNPDKCEFLNNFGPGJHAJAIHA!M!S!PKKFPIABOELHBGOAEKKGBBGANBJNMDDAEDLCBNPPIFFBBMNNG!Sheets!1!Objects!PrxShape1</id>
  </shapeMon>
<tArg xmlns="">
<bca>
<it>
  <color r="100" g="100" b="100" a="0" />
  </it>
<it>
  <color r="200" g="200" b="200" a="0" />
  </it>
  </bca>
<bdca>
<it>
  <color r="182" g="182" b="182" a="0" />
  </it>
  </bdca>
  <bw>0.5</bw>
  <txt>Rounded rectangle</txt>
  <va>0</va>
  <ha>1</ha>
  </tArg>
  </SetPrxShape>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SetPrxShapeResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</SetPrxShapeResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetPrxShape" :
{
"shapeMon" :
{
"id" : "NIOJJPAOELHBGOAEEIPNMJOEPPNPDKCEFLNNFGPGJHAJAIHA!M!S!PKKFPIABOELHBGOAEKKGBBGANBJNMDDAEDLCBNPPIFFBBMNNG!Sheets!1!Objects!PrxShape1"
},
"tArg" :
{
"bca" :
{
"it" :
[
{
"color" :
{
"@a" : "0",
"@r" : "100",
"@b" : "100",
"@g" : "100"
}
},
{
"color" :
{
"@a" : "0",
"@r" : "200",
"@b" : "200",
"@g" : "200"
}
}
]
},
"bdca" :
{
"it" :
{
"color" :
{
"@a" : "0",
"@r" : "182",
"@b" : "182",
"@g" : "182"
}
}
},
"bw" : "0.5",
"txt" : "Rounded rectangle",
"va" : "0",
"ha" : "1"
}
}
}

JSON response:

{
"SetPrxShapeResult" : "1"
}
public static bool SetPrxShape(string moniker, uint sheetKey, string shapeId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetPrxShape()
{
shapeMon = new PrxShapeId()
{
id = moniker + "!Sheets!" + sheetKey + "!Objects!" + shapeId
},
tArg = new PrxShapeParams()
{
bca = new GradientColor[] // Gradient background fill
{
new GradientColor()
{
color = new BaseColor()
{ r = 100, rSpecified = true,
g = 100, gSpecified = true,
b = 100, bSpecified = true,
a = 0, aSpecified = true }
},
new GradientColor()
{
color = new BaseColor()
{ r = 200, rSpecified = true,
g = 200, gSpecified = true,
b = 200, bSpecified = true,
a = 0, aSpecified = true }
}
},
bdca = new GradientColor[] // Shape border fill
{
new GradientColor()
{
color = new BaseColor()
{ r = 182, rSpecified = true,
g = 182, gSpecified = true,
b = 182, bSpecified = true,
a = 0, aSpecified = true }
}
},
bw = 0.5f, // Width
txt = "Rounded rectangle", // Text in shape
ha = 1, // Horizontal alignment - Center
va = 0 // Vertical alignment - Top
}
};
// Change shape settings
var result = somClient.SetPrxShape(tSet);
return result;
}

See also:

Working with Regular Reports