leely1
27th May 2016, 05:58
Hi,
I have created a session and added report to link with my SQL queries. I have added 2 input fields on from / to date range for user to input and SQL queries will retrieve the data based on the input date. Can I know how can I link the input fields with my SQL queries ? BTW, I am trying to write a Inventory GRN listing by date. Hope you can provide me some guidance. Thank you.

Ajesh
28th May 2016, 11:42
If form.f and form.t are your form fields , and you are using the standard print command in your session, then you can link it as follows



choice.print.data:
on.choice:
if rprt_open() then
print.table.data()
rprt_close()
endiff

.
.
.

function print.table.data()
{

select tdsls850.*
from tdsls850
where tdsls850.odat BETWEEN :form.f
and :form.t
selectdo
rprt_send()
endselect

}