09 May 2011

Query Filter in form

In new form->write a method in DS->

void filterOnVendTable()
{
QueryBuildRange vendorAccountFilter;
;
vendorAccountFilter = this.query().dataSourceNo(1).addRange(fieldnum(VendTable, AccountNum));
vendorAccountFilter.value("3000..3010");
}

____
Call this method in DS->Init()
public void init()
{
super();
this.filterOnVendTable();
}

2 comments:

  1. hi
    I have a Form with Header using Student TABLE with Field as StudentId and Line Using Marks TABLE with Fields as StudendId , Subject , Result(Enum:Pass,Fail).Here my Requirement is when we open a Form it should Show only Subjects whose Result is Pass for Particular Record Selected in Header(Student Table).And when we Click a Button in Line it should show all Subjects i.e Both Pass and Fail, for particular Record Selected in Header .Here i Could Filter By writing QueryRange in Init method of Marks DataSource.But how to get all Subjects for particular Record Selected in Header i.e both passed and failed Subjects.Please help me out


    Thank You
    Chinna

    ReplyDelete
  2. thank's it's work fine with me

    ReplyDelete

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...