Skip to main content

Change the color of individual field in ax 2009 Report


public void executeSection()
{
int controlcount;
int counter;
int usecolor;
int oldcolor;
object reportobject;
;
controlcount=this.controlCount();
oldcolor=this.foregroundColor();
if(oldcolor==WinApi::RGB2int(255,255,255))
usecolor=WinApi::RGB2int(209,209,209);
else
usecolor=WinApi::RGB2int(255,255,255);
this.foregroundColor(usecolor);
for(counter=1;counter<=controlcount;counter++)
{
reportobject=this.controlNo(counter);
reportobject.backgroundColor(usecolor);
}
super();
}

Comments