how to get print preview of more than
one page in crystal report in c#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ravi KumarRank #2,085 · 690 reputationPosted Sep 16, 2014, 4:42 AM EDT
try the fallowing
DataTable dt = new DataTable();
ReportDocument MedicalReport = new ReportDocument();
SqlDataAdapter da1 = new SqlDataAdapter("ProcedureName", con);
da1.SelectCommand.CommandType = CommandType.StoredProcedure;
da1.SelectCommand.Parameters.AddWithValue("@SiteId", ddlSite.SelectedValue);
dt.Clear();
da1.Fill(dt);
if (dt.Rows.Count > 0)
{
MedicalReport.Load(Server.MapPath("ReportName"));
MedicalReport.SetDataSource(dt);
CrystalReportViewer1.ReportSource = MedicalReport;
CrystalReportViewer1.DataBind();
}