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.Repor
t.FileName
= Server.MapPath("Report1.rp
t")
CrystalReportSource1.Repor
tDocument.
SetDatabas
eLogon("my
user", "mypassword")
CrystalReportViewer1.Visib
le = False
CrystalReportSource1.Repor
tDocument.
VerifyData
base()
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
CrystalReportSource1.Repor
tDocument.
ExportToHt
tpResponse
(ExportFor
matType.Po
rtableDocF
ormat, Response, True, "Report1")
Start Free Trial