Tuesday 8 November 2011

Highlight the Selected Record Row in Axapta Report

Hi,
To highlight the  row in axapta report based on specific value just add the following code in the execution section  of section group.

public void executeSection()
{
    int usecolor
    ;
    usecolor=WinApi::RGB2int(255,0,0);
    if(inventTable.itemprice>5)
    {

        this.foregroundColor(usecolor);
    }
    else
    {
        this.foregroundColor(white);
    }
    super();

}

this will highlight all the record where item greater then 5.
I hope it works .
Regards,