=> in design view remove any crystal report viewer control if placed and put below code
<div id="divPDFView" runat="server" >
</div>
=> Dont forget to create folder "PDFExports" in root
=> Just call below function to show report. (Replace values with your values where '?' is placed and report should be in folder named "Reports" )
private void ShowReport()
{
ReportDocument rd = new ReportDocument();
rd.Load(Path.Combine(Server.MapPath("~/Reports"), "?ReportName.rpt"));
//@@: Record Selection formula
//rd.RecordSelectionFormula = "???";
rd.SetDatabaseLogon(?UserId, ?Password, ?DbServer, "");
//@@: Parameters
//rd.SetParameterValue("cpf_1", ""); //String
//rd.SetParameterValue("cpf_2", Convert.toInt32("1")); //Int
//@@: Parameters to Subreport
//rd.SetParameterValue("cpf_????", "", rd.Subreports[0].Name);
//@@: Set Title
//rd.SummaryInfo.ReportTitle = "Report as on " + DateTime.Today.Day + "-" + DateTime.Today.Month + "-" + DateTime.Today.Year;
//I use it for unique file names.. you can avoid it..
Guid g = Guid.NewGuid();
string strFileName = "?zReportName_" + DateTime.Now.ToString("yyyyMMdd-HHmmss") + "_" + Session["userId"].ToString() + "_" + g.ToString() + ".pdf";
rd.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Path.Combine(Server.MapPath("~/PDFExports"), strFileName));
divPDFView.InnerHtml = "<object data=\"PDFExports/" + strFileName + "\" type=\"application/pdf\" width=\"1230\" height=\"880\"> alt : <a href=\"PDFExports\\a.pdf\">PDF File</a> </object>";
rd.Dispose();
rd.Close();
}