Date Type Parameter in Report Viewer

Jul 22 2010 3:36 AM
Hi all !
Please help me ..urgent...In Visual Studio VB 2005
I am holding a VB.Net form with a Report viewer dropped in it along with 2 TextBox es and a Button.
Now i have linked a report tht works well in the query builder with FromDate and ToDate parameter.
In the VB.Net Code when i tried to execute the form im always getting a error like either
'Type 'FromDate' string cannot be converted to 'Date' type '  or 
Value of type 'Date' cannot be converted to 'Microsoft.Reporting.WinForms.ReportParameter'. 
please assist me how to achieve passing Date type parameter as REportParameter in the ReportViewer. 

Code is as follows:
------------------------------------- 
Dim F_Date As Date = TextBox1.ToString
Dim T_Date As Date = TextBox2.ToString
Dim FDate As New ReportParameter(F_Date)
Dim TDate As New ReportParameter(T_Date)
Dim rp() As ReportParameter = {FDate, TDate} 
'TODO: This line of code loads data into the 'Sales.DataTable1' table. You can move, or remove it, as needed.

       Me.DataTable1TableAdapter.Fill(Me.Sales.DataTable1, "F_Date", "T_Date")

        Me.ReportViewer1.LocalReport.SetParameters(rp)

        Me.ReportViewer1.RefreshReport()
 
******
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Try

            Me.DataTable1TableAdapter.Fill(Me.Sales.DataTable1, TextBox1.ToString, TextBox2.ToString)

            Me.ReportViewer1.RefreshReport()

        Catch ex As Exception

            System.Windows.Forms.MessageBox.Show(ex.Message)

        End Try

    End Sub
-------------------------------------------

PLease any one help me....