SetDataAreaGridAttachments

Syntax

EaxAttachmentChangeResult SetDataAreaGridAttachments(string mon, EaxAttachmentPattern tPattern, EaxAttachments tArg)

Parameters

mon. Moniker of the Table visualizer.

tPattern. Operation execution pattern.

tArg. Attachments that should be linked to a cell.

Description

The SetDataAreaGridAttachments operation changes the list of table cell attachments.

Comments

To execute the operation, in the mon field specify moniker of regular report instance with the !DataArea!DataSources!source key!DataSourceSlices!slice key!Views!table key postfix. The moniker can be obtained on executing the OpenPrxMeta operation. In the tPattern field specify coordinates of the cell, which attachments should be changed, and in the tArg field specify a list of attachments ad actions with them.

The operation results in the information about changed attachment.

When a new attachment is added, after executing the SetDataAreaGridAttachments operation the attachment should be loaded to BI server using the PutBin operation. As a moniker for PutBin, specify moniker for SetDataAreaGridAttachments + !Attachments!attachment key. The attachment key will be available in the result of the SetDataAreaGridAttachments operation.

Example

Below is the example of adding a table cell attachment. The request contains table moniker, cell coordinates, and information about the added attachment. The response contains attachment metadata with the key that should be used by the PutBin operation to load file to BI server.

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">
<SetDataAreaGridAttachments xmlns="http://www.fsight.ru/PP.SOM.Som">
  <mon xmlns="">MEIAHFNGIHOCGOAEIHCLFJLBBEPLGOEELKAMEOCBAIKLGBGC!M!S!PJOILJGNGIHOCGOAEGFPAJAHCFFGJOBPEBIDPPGBPPHEIJJHB!DataArea!DataSources!1!DataSourceSlices!1!Views!1</mon>
<tPattern xmlns="">
  <row>3</row>
  <column>2</column>
  </tPattern>
<tArg xmlns="">
<its>
<it>
  <name>readmy</name>
  <type>Value</type>
  <fileName>readmy.txt</fileName>
  <date>2024-05-15T00:00:00+05:00</date>
  <size>100</size>
  <changeType>Add</changeType>
  </it>
  </its>
  </tArg>
  </SetDataAreaGridAttachments>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetDataAreaGridAttachmentsResult 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">
<item xmlns="">
  <key>4294967196</key>
  <name>readmy</name>
  <type>Value</type>
  <fileName>readmy.txt</fileName>
  <date>2024-05-15T00:00:00.000</date>
  <size>100</size>
  <user>the ADMIN user</user>
  </item>
  </SetDataAreaGridAttachmentsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetDataAreaGridAttachments" :
{
"mon" : "MEIAHFNGIHOCGOAEIHCLFJLBBEPLGOEELKAMEOCBAIKLGBGC!M!S!PJOILJGNGIHOCGOAEGFPAJAHCFFGJOBPEBIDPPGBPPHEIJJHB!DataArea!DataSources!1!DataSourceSlices!1!Views!1",
"tPattern" :
{
"row" : "3",
"column" : "2"
},
"tArg" :
{
"its" :
{
"it" :
[
{
"name" : "readmy",
"type" : "Value",
"fileName" : "readmy.txt",
"date" : "2024-05-15T00:00:00+05:00",
"size" : "100",
"changeType" : "Add"
}
]
}
}
}
}

JSON response:

{
"SetDataAreaGridAttachmentsResult" :
{
"item" :
{
"key" : "4294967196",
"name" : "readmy",
"type" : "Value",
"fileName" : "readmy.txt",
"date" : "2024-05-15T00:00:00.000",
"size" : "100",
"user" : "the ADMIN user"
}
}
}
public static EaxAttachmentChangeResult SetDataAreaGridAttachments(string moniker, uint sourceKey, uint sliceKey, uint viewKey, uint cellRow, uint cellColumn, EaxAttachments attach)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetDataAreaGridAttachments()
{
tPattern = new EaxAttachmentPattern()
{
row = cellRow,
column = cellColumn
},
tArg = attach,
mon = moniker + "!DataArea!DataSources!" + sourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Views!" + viewKey.ToString()
};
// Change cell attachments
var result = somClient.SetDataAreaGridAttachments(tSet);
return result;
}

See also:

Working with Regular Reports