AOT Report level validation for Restrict Rows according to Condition Ax 2009

rptv1

CODE

public boolean fetch()
{
boolean retCode = false;
ReportValidation bankAccountTableRec;
QueryRun qrun;
int a=1;
int cpt = 0;

;
// Use the queryRun object that is associated with the
// report; element refers to the report.
qrun = new QueryRun(element);

// Verify that the report dialog works.
if (! qrun.prompt())
{
return retCode;
}

// Loop through each record from the data source query of the report.
while (qrun.next())
{
// Get the BankAccountTable fields from the query record.
bankAccountTableRec = qrun.get(TableNum(ReportValidation));

// Exclude ODDBANK from the visible report.
if (bankAccountTableRec.Price != 0)
{
// Include the current record in the report.
element.send(bankAccountTableRec);
}

}

element.printJobSettings().setTarget(Printmedium::Screen);
retCode = true;

// retCode = super(); // Do not call super() when you override the fetch method.
return retCode;

}

OUTPUT

rptv2

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s