Imports System.Data
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.Shared
Dim rptDoc As New ReportDocument
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim rptPath As String
rptPath = Server.MapPath("./Reports/rptTest1.rpt")
rptDoc.Load(rptPath)
crvTest1.ReportSource = rptDoc
End Sub
Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click
rptDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "ExportedReport")
End Sub