How to get date value from Dialog in run method ?

In AP->Vendor Transaction Report-> Added From Date and To Date in dialog()

and i am able to get the values of from date and to date also in getfromdialog(),

but in run method those two date values are null.

//class declaration

DialogField dialogFromDate;
DialogField dialogToDate;
TransDate fromDate;
TransDate toDate;

dialog()

{

dialogFromDate = dialog.addFieldValue(typeid(TransDate),fromDate, “@SYS5209”, “@SYS26930”);
dialogToDate = dialog.addFieldValue(typeid(TransDate),toDate, “@SYS14656”,"@SYS26929");

}

getfromdialog()

{

fromDate = dialogFromDate.value();
toDate = dialogToDate.value();

}

run()

{

if (queryRun)
{
while (queryRun.next())
{
vendTransCheck = queryRun.get(tablenum(VendTrans));

if (fromDate || toDate)
{
queryRun.query().dataSourceNo(2).addRange(fieldnum(VendTrans,TransDate)).value(queryRange(fromDate, toDate));
}
}

}

}

Hi Satya,

Please go to that menuItem of the report and change the ‘RunOn’ property from server to client.

Probably menu item for your report is VendTransList.

Hi Vishal,

Thank you. I changed the menuitem running from Server to client and it worked.

But besides this i got one more solution…

Added fromdate and todate fields into currentList in class declaration and it worked also.But i don’t know what is this currentList and why is it there in class declaration ? Anyway…it worked…[:)]

#LOCALMACRO.CurrentList
exchAdj,
remainAmount,
includeReversed,

#ENDMACRO