Class ExportBase
The base class for all export filters.
Inheritance
Implements
Inherited Members
Namespace: FastReport.Export
Assembly: FastReport.dll
Syntax
public class ExportBase : Base, IDisposable, IFRSerializable
Constructors
ExportBase()
Initializes a new instance of the ExportBase class.
Declaration
public ExportBase()
Fields
webPreview
Declaration
protected bool webPreview
Field Value
| Type | Description |
|---|---|
| System.Boolean |
Properties
AllowOpenAfter
Allows or disables the OpenAfterExport feature.
Declaration
public bool AllowOpenAfter { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
CurPage
Current page number.
Declaration
public int CurPage { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Remarks
Page number need to be exported if user selects "Current page" radiobutton in the export options dialog. This property is typically set to current page number in the preview window.
ExportAllTabs
Gets or sets a value indicating that pages will exporting from all open tabs.
Declaration
public bool ExportAllTabs { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
FileFilter
File filter that can be used in the "Save file" dialog.
Declaration
public string FileFilter { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
FileName
File name to export to.
Declaration
protected string FileName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
GeneratedFiles
Gets a list of files generated by this export.
Declaration
public List<string> GeneratedFiles { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
GeneratedStreams
Gets list of generated streams.
Declaration
public List<Stream> GeneratedStreams { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.IO.Stream> |
HasMultipleFiles
Gets a value indicating that the export may produce multiple output files.
Declaration
public bool HasMultipleFiles { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
OpenAfterExport
Open the document after export.
Declaration
public bool OpenAfterExport { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
PageNumbers
Page numbers to export.
Declaration
public string PageNumbers { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Use page numbers separated by comma and/or page ranges, for example: "1,3-5,12". Empty string means that all pages need to be exported.
PageRange
Range of pages to export.
Declaration
public PageRange PageRange { get; set; }
Property Value
| Type | Description |
|---|---|
| PageRange |
Pages
Array of page numbers to export.
Declaration
protected int[] Pages { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32[] |
SaveInitialDirectory
Gets or sets the initial directory that is displayed by a save file dialog.
Declaration
public string SaveInitialDirectory { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ShiftNonExportable
Gets or sets a value indicating that the report bands should be shifted, if page has any non-exportable bands
Declaration
public bool ShiftNonExportable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ShowProgress
Gets or sets a value that determines whether to show progress window during export or not.
Declaration
public bool ShowProgress { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Stream
Stream to export to.
Declaration
protected Stream Stream { get; }
Property Value
| Type | Description |
|---|---|
| System.IO.Stream |
Zoom
Zoom factor for output file
Declaration
public float Zoom { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
Assign(Base)
Copies the contents of another, similar object.
Declaration
public override void Assign(Base source)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | source | Source object to copy the contents from. |
Overrides
Remarks
Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is
destination.Assign(source);
which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.
See Also
Export(Report, Stream)
Exports the report to a stream.
Declaration
public void Export(Report report, Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Report | report | Report to export. |
| System.IO.Stream | stream | Stream to export to. |
Remarks
This method does not show an export options dialog. If you want to show it, call
Export(Report, String)
Exports the report to a file.
Declaration
public void Export(Report report, string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| Report | report | Report to export. |
| System.String | fileName | File name to export to. |
Remarks
This method does not show an export options dialog. If you want to show it, call
ExportBand(BandBase)
This method is called for each band on exported page.
Declaration
protected virtual void ExportBand(BandBase band)
Parameters
| Type | Name | Description |
|---|---|---|
| BandBase | band | Band, dispose after method compite. |
ExportPageBegin(ReportPage)
This method is called at the start of exports of each page.
Declaration
protected virtual void ExportPageBegin(ReportPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPage | page | Page for export may be empty in this method. |
ExportPageEnd(ReportPage)
This method is called at the end of exports of each page.
Declaration
protected virtual void ExportPageEnd(ReportPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPage | page | Page for export may be empty in this method. |
Finish()
This method is called when the export is finished.
Declaration
protected virtual void Finish()
GetFileFilter()
Returns a file filter for a save dialog.
Declaration
protected virtual string GetFileFilter()
Returns
| Type | Description |
|---|---|
| System.String | String that contains a file filter, for example: "Bitmap image (.bmp)|.bmp" |
GetOverlayPage(ReportPage)
Gets a report page with OverlayBand if it is a Demo or Academic.
Declaration
protected ReportPage GetOverlayPage(ReportPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPage | page | The prepared report page |
Returns
| Type | Description |
|---|---|
| ReportPage | The prepared report page with OverlayBand. |
GetOverlayPage(ReportPage)
Gets a report page with OverlayBand if it is a Demo or Academic.
Declaration
protected ReportPage GetOverlayPage(ReportPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPage | page | The prepared report page |
Returns
| Type | Description |
|---|---|
| ReportPage | The prepared report page with OverlayBand. |
GetPage(Int32)
Gets a report page with specified index.
Declaration
protected ReportPage GetPage(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Zero-based index of page. |
Returns
| Type | Description |
|---|---|
| ReportPage | The prepared report page. |
InstantExportBeginPage(ReportPage)
Declaration
public void InstantExportBeginPage(ReportPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPage | page |
InstantExportEndPage(ReportPage)
Declaration
public void InstantExportEndPage(ReportPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPage | page |
InstantExportExportBand(BandBase)
Declaration
public void InstantExportExportBand(BandBase band)
Parameters
| Type | Name | Description |
|---|---|---|
| BandBase | band |
InstantExportFinish()
Declaration
public void InstantExportFinish()
InstantExportStart(Report, Stream)
Declaration
public void InstantExportStart(Report report, Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| Report | report | |
| System.IO.Stream | stream |
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
Start()
This method is called when the export starts.
Declaration
protected virtual void Start()