ReportDocument.ExportToHttpResponse Method (CrystalDecisions.Shared.ExportFormatType,System.Web.HttpResponse,Boolean,String)
Exports a report to the response object in the specified format.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Overrideable Sub ExportToHttpResponse ( _
ByVal formatType As CrystalDecisions.Shared.ExportFormatType, _
ByVal response As System.Web.HttpResponse, _
ByVal asAttachment As Boolean, _
ByVal attachmentName As String _
)
public virtual void ExportToHttpResponse (
CrystalDecisions.Shared.ExportFormatType formatType,
System.Web.HttpResponse response,
bool asAttachment,
string attachmentName
)
Parameters
- formatType
The format type to export the report.
- response
The response object of the page.
- asAttachment
Indicates whether or not the report will be exported as an attachment of the response.
- attachmentName
The file name to export the report.
Example
This example exports a report to the browser as a PDF document.
'Declaration
Dim rptDocument As ReportDocument = new ReportDocument()
rptDocument.Load("Report.rpt")
rptDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, "")
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(@"Report.rpt");
reportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "");
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports .NET 10
See Also
Reference
ReportDocument Class
ReportDocument Members
CrystalDecisions.CrystalReports.Engine Namespace