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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ravi KumarPosted Sep 16, 2014, 8:42 AM
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();
}