Call openconnection() str = "SELECT * from New_Case_Id_Master where CaseId=" & s_no & "" da = New SqlDataAdapter(str, cn) ds.Clear() da.Fill(ds, "New_Case_Id_Master") 'MsgBox(ds.Tables("New_Case_Id_Master").Rows.Count) cn.Close() 'print directly using button click Dim objRpt As New CrystalReport_for_FrontDesk objRpt.SetDataSource(ds.Tables("New_Case_Id_Master")) CrystalReportViewer1.ReportSource = objRpt CrystalReportViewer1.PrintReport() CrystalReportViewer1.PrintReport() CrystalReportViewer1.Refresh()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)