the following code is may be help you...
Public Sub clientid()
Dim sqlQRY As String
Dim reportPath As String = "Company_Reckon_Invoice.Report4.rdlc"
Dim sReportDataSource As New ReportDataSource
sqlQRY = " SELECT c.invoiceid,c.clientid,c.clientname,c.productname, d.Description,(SUM(c.totalamount)-SUM(c.amountpaid)) as BalanceAmount FROM receipt AS c,invoice as d where d.clientid = c.clientid and d.clientid=" + TextBox1.Text + " and c.productname=d.productname and c.invoiceid=d.invoiceid group by c.invoiceid,c.clientid,c.clientname,c.productname, d.Description"
ds = New DataSet
clientidd = New OleDbDataAdapter(sqlQRY, conn)
clientidd.Fill(ds, "receipt")
ReportViewer1.LocalReport.ReportEmbeddedResource = reportPath
sReportDataSource.Name = "DataSet1"
sReportDataSource.Value = ds.Tables(0)
Dim param(0) As ReportParameter
param(0) = New ReportParameter("bank", TextBox9.Text)
ReportViewer1.LocalReport.SetParameters(param)
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(sReportDataSource)
Me.ReportViewer1.RefreshReport()
End Sub
here
Company_Reckon_Invoice.Report4.rdlc
Company_Reckon_Invoice=Project name.
Report4.rdlc= rdlc report name.
now you just call the clientid() for your button1 or button2.
you want change tha rdle means just change tha report path,database table name and datasource name...
i hope this answer is helping you..