protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            try
            {
                GlobalConnection gc = new GlobalConnection();
                PatientClass     pc = new PatientClass();

                DataTable dt = pc.SelectForViewPatientRecords_ForReport();
                if (dt.Rows.Count > 0)
                {
                    ltrMessage.Text = "";

                    ReportViewer1.Reset();

                    // OR Set Report Path
                    ReportViewer1.LocalReport.ReportPath = HttpContext.Current.Server.MapPath("Report_Patient_OtherUserMaster.rdlc");

                    // Clear the Data Source
                    ReportViewer1.LocalReport.DataSources.Clear();

                    // Set a DataSource to the report
                    ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", dt));
                    ReportViewer1.DataBind();

                    // Refresh and Display Report
                    ReportViewer1.LocalReport.Refresh();
                }
                else
                {
                    ltrMessage.Text = "No data found!";
                    ReportViewer1.Reset();
                    ReportViewer1.LocalReport.DataSources.Clear();
                    ReportViewer1.DataBind();
                    ReportViewer1.LocalReport.Refresh();
                }
            }
            catch (Exception ex)
            {
                ltrMessage.Text = ex.Message;
            }
        }
    }