'Yearly reports shows different dates

i would like to ask how we can fix our project in vb we are currently on the yearly and monthly reports generation but when we choose a date outside the year 2022 it still shows the 2022 data for that month. here is our code that we use

Dim cr1 As New CrystalReport1
Dim da As New SqlDataAdapter("select Date, Customer_No, Table_No, Order_ID, Total_Amount from SalesTable5 where Date between '" & DateTimePicker1.Text & "' and '" & DateTimePicker2.Text & "' order by Date desc", con)
Dim dt As New DataTable
da.Fill(dt)
cr1.SetDataSource(dt)
CrystalReportViewer1.ReportSource = cr1
CrystalReportViewer1.RefreshReport()


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source