Class ReportWriter
ReportWriter class to Export the Report.
Inheritance
Implements
Inherited Members
Namespace: BoldReports.Writer
Assembly: BoldReports.Web.dll
Syntax
public class ReportWriter : WriterBase, IDisposable
Constructors
ReportWriter()
Initializes a new instance of the ReportWriter class.
Declaration
public ReportWriter()
Remarks
Contains all the properties and events to process the export of the report.
ReportWriter(Stream)
Initializes a new instance of the ReportWriter class.
Declaration
public ReportWriter(Stream rdlStream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | rdlStream | Specifies the report stream to the ReporViewer to load report. |
ReportWriter(Stream, ReportDataSourceCollection)
Initializes a new instance of the ReportWriter class.
Declaration
public ReportWriter(Stream rdlStream, ReportDataSourceCollection reportDataSources)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | rdlStream | Specifies the report stream to the ReporViewer to load report. |
BoldReports.Web.ReportDataSourceCollection | reportDataSources | A ReportDataSourceCollection object that contains the collection of data sources used in the report |
ReportWriter(String)
Initializes a new instance of the ReportWriter class.
Declaration
public ReportWriter(string rdlFileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | rdlFileName | The filename of the report with its full path |
ReportWriter(String, ReportDataSourceCollection)
Initializes a new instance of the ReportWriter class.
Declaration
public ReportWriter(string rdlFileName, ReportDataSourceCollection reportDataSources)
Parameters
Type | Name | Description |
---|---|---|
System.String | rdlFileName | The filename of the report with its full path |
BoldReports.Web.ReportDataSourceCollection | reportDataSources | A ReportDataSourceCollection object that contains the collection of data sources used in the report. |
Methods
Dispose()
Provides a mechanism for releasing unmanaged resources.
Declaration
public void Dispose()
Remarks
It close or release unmanaged resources such as files, streams, and handles held by an instance of the class that implements this interface.
LoadReport(ReportDefinition)
Loads a report definition from the locally modified report using a BoldReports.RDL.DOM.ReportDefinition
Declaration
public void LoadReport(ReportDefinition reportDefinition)
Parameters
Type | Name | Description |
---|---|---|
ReportDefinition | reportDefinition | A BoldReports.RDL.DOM.ReportDefinition class that contains the report definition for a report |
RaiseSubReportProcessingEvent(SubreportProcessingEventArgs)
Declaration
protected virtual void RaiseSubReportProcessingEvent(SubreportProcessingEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
SubreportProcessingEventArgs | e |
ReportModelReportException(Object, ReportWriter.ReportErrorEventArgs)
Occurs when error in report.
Declaration
protected void ReportModelReportException(object sender, ReportWriter.ReportErrorEventArgs arg)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The source of the event. |
ReportWriter.ReportErrorEventArgs | arg | An ReportErrorEventArgs that contains the event data. |
Save(Stream, WriterFormat)
Saves the local report as file formats like PDF, Excel, Word, HTML, CSV, XML, and more.
Declaration
public void Save(Stream stream, WriterFormat format)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream of the report which has to be saved. |
WriterFormat | format | Represents the format in which the report has to be saved. |
Save(String, WriterFormat)
Exports the report as a PDF document
Declaration
public void Save(string fileName, WriterFormat format)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The name of the Pdf file to be saved |
WriterFormat | format | The writer format to be saved |
Save(String, WriterFormat, HttpResponse)
Saves the document into a HTTP response stream.
Declaration
public void Save(string fileName, WriterFormat format, HttpResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | File name to save the report. |
WriterFormat | format | Format to save the report. |
System.Web.HttpResponse | response | The HTTP response stream object. |
Events
ExportCompleted
Occurs when Export completed.
Declaration
public event ReportWriter.ExportCompletedEventHandler ExportCompleted
Event Type
Type | Description |
---|---|
ReportWriter.ExportCompletedEventHandler |
ReportError
Occurs when error in report.
Declaration
public event ReportWriter.ReportErrorHandler ReportError
Event Type
Type | Description |
---|---|
ReportWriter.ReportErrorHandler |
SubreportProcessing
Occurs when SubreportProcessing.
Declaration
public event SubreportProcessingEventHandler SubreportProcessing
Event Type
Type | Description |
---|---|
SubreportProcessingEventHandler |