Torna al Thread

Partial Class _Default Inherits System.Web.UI.Page Public report As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument() Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load report.Load(Server.MapPath("") & "\test.rpt") report.FileName = Server.MapPath("") & "\test.rpt" report.SetParameterValue("test", "test") Dim idpath, part As String idpath = Server.MapPath("") part = idpath & "\part.pdf" report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, part) Response.ContentType = "application/pdf" Response.TransmitFile(part) End Sub Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload report.Close() report.Dispose() End Sub End Class
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5