добавлю свои пять копеек
кусок кода из класса печати этикеток, преобразует репорт дизайн в EPL для печати напрямую этикеточный принтер
X++:
void addSection(ReportSection _reportSection, common _cursor)
{
ReportControl reportControl;
ReportStringControl reportStringControl;
SysDictClass classObj = new SysDictClass(classnum(ReportSection));//
int childNodesCount;
int i;
;
childNodesCount = _reportSection.AOTchildNodeCount();
txt += "\nN\n";
for(i = 0; i < childNodesCount; i++)
{
reportControl = _reportSection.controlNo(i);
if (! reportControl)
continue;
if (reportControl.controlType() == ReportFieldType::String)
{
reportStringControl = reportControl;
if (reportStringControl.font() == "BC C128 Medium")
{
txt += "B" + this.position(reportControl.left100mm()/12, reportControl.top100mm()/12);
this.addBarCode(reportControl, _reportSection, _cursor, classObj);
txt += "\n";
continue;
}
}
txt += "A" + this.position(reportControl.left100mm()/12, reportControl.top100mm()/12);
switch (reportControl.controlType())
{
case ReportFieldType::Text:
this.addText(reportControl, _reportSection, _cursor, classObj);
break;
case ReportFieldType::String:
this.addString(reportControl, _reportSection, _cursor, classObj);
break;
case ReportFieldType::Integer:
this.addInteger(reportControl, _reportSection, _cursor, classObj);
break;
case ReportFieldType::Real:
this.addReal(reportControl, _reportSection, _cursor, classObj);
break;
}
txt += "\n";
}
txt += "P1\n";
X++:
void addString(ReportControl _reportControl, ReportSection _reportSection, common _cursor, SysDictClass _classObj)
{
ReportStringControl reportControl = _reportControl;
str s;
;
txt += this.font(reportControl.fontSize(), reportControl.bold(),
reportControl.italic(), reportControl.font());
if (reportControl.dataField())
{
s = _cursor.(reportControl.dataField());
}
if (reportControl.dataMethod())
{
s = _classObj.callObject(reportControl.dataMethod(), _reportSection);
}
s = strreplace(s, "\"","'");
txt += strfmt("\"%1\"", s);
}
могу весь класс выложить если кому интересно