Class ExportBase
The base class for all export filters.
Implements
Inherited Members
Namespace: FastReport.Export
Assembly: FastReport.OpenSource.dll
Syntax
public class ExportBase : Base, IFRSerializable
Constructors
ExportBase()
Initializes a new instance of the ExportBase class.
Declaration
public ExportBase()
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.
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> |
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(Base) 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(Base)
This method is called for each band on exported page.
Declaration
protected virtual void ExportBand(Base band)
Parameters
Type | Name | Description |
---|---|---|
Base | 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" |
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. |
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(Base) 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()