try this ,My working code...
Common.Common obj = new Common.Common();
ReportDocument RptDocument = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
DataSet dsFiiReport123 = obj.GetData("uspGetHeader", new object[] { });
DataSet dsFiiReport = obj.GetData("uspReportData", new object[] { });
if (dsFiiReport.Tables[0].Rows.Count > 0)
{
CrystalReportViewer1.DisplayGroupTree = false;
dsFiiReport.Tables[0].TableName = "uspReportData";
RptDocument.Load(Server.MapPath("~/Report/crvData.rpt"));
RptDocument.SetDataSource(dsFiiReport);
RptDocument.Subreports[0].SetDataSource(dsFiiReport123.Tables[0]);
CrystalReportViewer1.ReportSource = RptDocument;
CrystalReportViewer1.DataBind();
CrystalReportViewer1.Visible = true;
}
else
{
CrystalReportViewer1.Visible = false;
Response.Write("<script>alert('No Recordes Found')</script>");
}
}