* i had created a dataset which is "dataset1.xsd"-> data table in dataset1.xsd is "trns" trns filds are mentioned below-:which is same as my database table trns
trns->
"tdate"
"ttime"
"tGoldQty"
"tSilverQty"
"tGoldRate"
"tSilverRate"
"tPaid"
* my rdlc file is report1.rdlc- from report menu - i had select report
data source which is DataSet1_trns
* my reportviewer name is reportviewer1 -> i had choose from reportviewer1 smarttag
my report which is report1.rdlc & rebind its data source
* from my windows form where is my reportviewer is crested there is a button to do the reporting
Private Sub Btnreport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnreport.Click
Dim DS As New DataSet1
Dim da As OleDbDataAdapter
Dim rds = New ReportDataSource
If Me.DateTimePicker1.Value <= Me.DateTimePicker2.Value Then
If Me.DateTimePicker1.Checked = False Then
report_fromdate = Format(CDate(sqldate), "MM/dd/yyyy")
Else
report_fromdate = Me.DateTimePicker1.Value.Date
End If
If Me.DateTimePicker2.Checked = False Then
report_todate = Format(CDate(sqldate), "MM/dd/yyyy")
Else
report_todate = Me.DateTimePicker2.Value.Date
End If
Me.ReportViewer1.Visible = True
con = connect()
cmd = New OleDb.OleDbCommand("select tdate,ttime,tGoldQty,tSilverQty,tGoldRate,tGoldRate,tPaid,tmode from trns", con)
con.Open()
cmd.ExecuteNonQuery()
da = New OleDbDataAdapter(cmd)
da.Fill(DS, "trns")
con.Close()
rds.Name = "dataset1_trns"
'ReportViewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\report1.rdlc"
rds.value = DS.Tables("trns")
ReportViewer1.LocalReport.DataSources.Add(rds)
ElseIf Me.DateTimePicker1.Value > Me.DateTimePicker2.Value Then
MsgBox(" Enter valid Date .....", MsgBoxStyle.Critical)
Exit Sub
End If
End Sub
but the report is showing nothing and dose not fires any error please help me