Query based Report , add parameter dateFrom and dateTo//

//your language script here
[SysEntryPointAttribute(false)]
public void processReport()
{
    Query q;
    QueryRun qr;
    TransDate dateTo,dateFrom;

    AITransporterPerformanceReportContract contract = this.parmDataContract() as AITransporterPerformanceReportContract;

    dateTo = contract.parmDateTo();
    dateFrom = contract.parmDateFrom();

    delete_from aiTmp;
    q = this.parmQuery();
    q.dataSourceTable(tablenum(CustPackingSlipJour)).addRange(fieldnum(CustPackingSlipJour, DeliveryDate)).value(queryRange( dateFrom, dateTo));
    qR = new QueryRun(q);
    while(qR.next())
    {
        // your logic
    }
}
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