date filter in a form

Hi Guys… I have a basic form which shows some data’s in grid and in action pane i have added two date edit and button to filter where user can enter the from date and to date and click on submit button when i click on submit button the filter does not happens still shows the same records which it was showing before.

i have wrote only one method on table data source method:

void filterDate()

{

QueryBuildRange daterange;

;

daterange = this.query().dataSourceNo(1).addRange(fieldNum(ANA_PlannedValues,Date));

daterange.value(strFmt(‘Date… ANA_PlannedValues.FromDate && …Date ANA_PlannedValues.ToDate’));

//i have used some thing like this :

// this.query().dataSourceName(“CustTable”).addRange (fieldnum(CustTable,Currency)).value(queryvalue(‘USD’));

}

but it is not showing any error and data’s are not getting filter dates and date edit and i didn’t wrote code and on the button submit i just called this method and refreshed the datasource any help will be appreciated thanks a lot…

hi rotit,

you are not suppose to post these kind of postings…

move applying the range values to executequery method and call the executeQuery method in the clicked event or when ever you want the filter to be applied (example: when the date fields are modified)

see \Forms\smmTransLog\Data Sources\smmTransLog\Methods\executeQuery