Не совсем понял, что надо, но вот пример кода (вам надо немного переделать) из отчета EmplAdvance_RU (Ax3)
X++:
public void executeSection()
{
ReportDesign design = element.design("Design");
real pageHeight = design.printerPageHeight() / 100 -
design.bottomMarginValue() -
design.topMarginValue();
real restHeight;
ReportRealControl rrc1 = element.design().sectionName('ProgrammableSection_4b').
controlName('Control_13');
ReportRealControl rrc2 = element.design().sectionName('ProgrammableSection_4b').
controlName('Control_14');
restHeight = pageHeight - element.currentYmm100()/100;
if (restHeight / pageHeight <= 0.35)
{
rrc1.visible(false);
rrc2.visible(false);
}
super();
if (! rrc1.visible())
{
element.newPage();
}
}