Friday, January 24, 2014

From Date to Todate filter

// From Date to TOdate filter
void clicked()
{
    SalesTablesReport salesTablesReport;
    TempSalesRep    tempSalesRepins;

    //delete_from tempSalesRepins;
//    info(strFmt("%1",fromdate.dateValue()));
    delete_from TempSalesRep;
     while select salesTablesReport where salesTablesReport.FromDate >= (fromdate.dateValue())
                                      && salesTablesReport.ToDate <=(todate.dateValue())
    {
        tempSalesRepins.CustAccount = salesTablesReport.CustAccount;
        tempSalesRepins.FromDate = salesTablesReport.FromDate;
        tempSalesRepins.ToDate = salesTablesReport.ToDate;
        tempSalesRepins.insert();
       // info(strFmt("%1",salesTablesReport.FromDate));
    }
    TempSalesRep_ds.research();
    TempSalesRep_ds.refresh();

}

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...