How can i generarte crstal report bwtween two dates by passing two perameters in vb.net

Thnaks in advance.

Edited 6 Years Ago by Naveed_786: n/a

I have made report with one date perameter it works fine but it didn't work with two peramets.I want to pass two dates and want to get result between two dates from same table.
Code i am using for single table is

(PaymentDate.Instalment) = (?PaymentDate)

If that is a SQL query, use next query:

SELECT * FROM table WHERE date > 'date' AND date < 'date2'
(PaymentDate.Instalment) > (?PaymentDate) And < (?OtherDate)

Edited 6 Years Ago by finito: n/a

Actully dates are not Linked with database user input any two dates and want to get result between to dates how can i do this?

Can i pass the value of two perametrs from single textbox? How can i do this please help.

It would be wiser to use DateTimePickers and send the Date in yyyyMMdd Format.

Sqlstring = "SELECT * FROM table WHERE DATE BETWEEN '" & Dtpicker1.Value.ToString("yyyyMMdd") & "' AND '" & Dtpicker2.Value.ToString("yyyyMMdd") & "'"

where Dtpicker1 and Dtpicker2 are DateTimePickers

Edited 6 Years Ago by finito: n/a

This question has already been answered. Start a new discussion instead.