Ниже приведен пример использования операции GetEaxMd для получения параметров колонтитулов экспресс-отчета. В запросе передается моникёр открытого экземпляра экспресс-отчета и шаблон, указывающий необходимость получить информацию о верхнем и нижнем колонтитуле. В ответе возвращаются полученные параметры колонтитулов.
{
"GetEaxMd" :
{
"tEax" :
{
"id" : "S1!M!S!E1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "false",
"header" : "true",
"footer" : "true"
}
}
}
}
{
"GetEaxMdResult" :
{
"id" :
{
"id" : "S1!M!S!E1"
},
"meta" :
{
"windowsPosition" : "Maximized",
"header" :
{
"left" :
{
"font" :
{
"family" : "Arial",
"style" : "",
"size" :
{
"width" : "-1",
"height" : "10",
"units" : "DLU96"
}
},
"textColor" : "#000000",
"imageAsBackground" : "0",
"imageSize" :
{
"width" : "0",
"height" : "0",
"units" : "DLU96"
}
},
"center" :
{
"font" :
{
"family" : "Arial",
"style" : "",
"size" :
{
"width" : "-1",
"height" : "10",
"units" : "DLU96"
}
},
"textColor" : "#000000",
"imageAsBackground" : "0",
"imageSize" :
{
"width" : "0",
"height" : "0",
"units" : "DLU96"
}
},
"right" :
{
"font" :
{
"family" : "Arial",
"style" : "",
"size" :
{
"width" : "-1",
"height" : "10",
"units" : "DLU96"
}
},
"textColor" : "#000000",
"imageAsBackground" : "0",
"imageSize" :
{
"width" : "0",
"height" : "0",
"units" : "DLU96"
}
},
"margin" :
{
"width" : "-1",
"height" : "10000",
"units" : "Mkm"
}
},
"footer" :
{
"left" :
{
"font" :
{
"family" : "Arial",
"style" : "",
"size" :
{
"width" : "-1",
"height" : "10",
"units" : "DLU96"
}
},
"textColor" : "#000000",
"text" : "Страница &[Page] из &[Pages]",
"imageAsBackground" : "0",
"imageSize" :
{
"width" : "0",
"height" : "0",
"units" : "DLU96"
}
},
"center" :
{
"font" :
{
"family" : "Arial",
"style" : "",
"size" :
{
"width" : "-1",
"height" : "10",
"units" : "DLU96"
}
},
"textColor" : "#000000",
"imageAsBackground" : "0",
"imageSize" :
{
"width" : "0",
"height" : "0",
"units" : "DLU96"
}
},
"right" :
{
"font" :
{
"family" : "Arial",
"style" : "",
"size" :
{
"width" : "-1",
"height" : "10",
"units" : "DLU96"
}
},
"textColor" : "#000000",
"imageAsBackground" : "0",
"imageSize" :
{
"width" : "0",
"height" : "0",
"units" : "DLU96"
}
},
"margin" :
{
"width" : "-1",
"height" : "10000",
"units" : "Mkm"
}
},
"hasPivot" : "1"
}
}
}
public static GetEaxMdResult GetPageHeader(EaxId moniker)
{
var somClient = new SomPortTypeClient(); //Прокси-объект для выполнения операций
//Параметры выполнения операции
var tEaxMd = new GetEaxMd()
{
tArg = new GetEaxMdArg()
{
//Шаблон, в соответствии с которым будут извлекаться метаданные
pattern = new EaxMdPattern()
{
obInst = false,
header = true,
footer = true
}
},
tEax = moniker
};
//Получение информации о верхнем и нижнем колонтитуле
var result = somClient.GetEaxMd(tEaxMd);
return result;
}
См. также: