Avatar of siddiqishahid
siddiqishahid

asked on 

Can not open crystal report in pdf format

I am trying using following code to open crystal report in PDF but it does not work. A window opens and then disappear. What are the causes?

CrystalReportSource1.Report.FileName = Server.MapPath("Report1.rpt")
        CrystalReportSource1.ReportDocument.SetDatabaseLogon("myuser", "mypassword")
        CrystalReportViewer1.Visible = False
        CrystalReportSource1.ReportDocument.VerifyDatabase()
        Response.Buffer = True
        Response.ClearContent()
        Response.ClearHeaders()
        CrystalReportSource1.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "Report1")
       
Crystal Reports

Avatar of undefined
Last Comment
siddiqishahid

8/22/2022 - Mon