adding parameters in ax 2009 report?

Hi kranthi

I write the this line of code in fetch method()

public boolean fetch()
{
PurchLine _purchLine;
QueryBuildDataSource qbds;
Query qry ;
querybuildrange qbr;
QueryRun qr;
;
qry = new Query(this.query().pack());
qbds = qry.dataSourceTable(TableNum(PurchLine));
qbr = qbds.addrange(fieldNum(PurchLine, DeliveryDate));
qbr.value(queryRange(fromDate, toDate));
qr = new QueryRun(this);

while (qr.next())
{
_purchLine = qr.get(TableNum(PurchLine));
this.send(_purchLine);
}

return True;
}

But it not pass the ranges between two dates(FromDate,ToDate). And not frame Query…Please Help me its very urgent