Class ExportBase
The base class for all export filters.
Inheritance
Namespace: FastReport.BG.Export
Assembly: FastReport.BG.dll
Syntax
public class ExportBase : Component, IComponent, IDisposable
Constructors
ExportBase()
Initializes a new instance of the ExportBase class.
Declaration
public ExportBase()
Fields
webPreview
Web Preview mode.
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 |
Chart
Gets reference to the ChartBase object.
Declaration
[Browsable(false)]
public ChartBase Chart { get; }
Property Value
Type | Description |
---|---|
ChartBase |
ClassName
Gets the short type name.
Declaration
[Browsable(false)]
public string ClassName { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Returns the short type name, such as "TextObject".
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 |
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 |
Stream
Stream to export to.
Declaration
protected Stream Stream { get; }
Property Value
Type | Description |
---|---|
System.IO.Stream |
Methods
Export(ChartBase)
Exports the chart to a file.
Declaration
public bool Export(ChartBase chart)
Parameters
Type | Name | Description |
---|---|---|
ChartBase | chart | Chart to export. |
Returns
Type | Description |
---|---|
System.Boolean | true if chart was succesfully exported. |
Remarks
This method displays an export options dialog, then prompts a file name using standard "Open file" dialog. If both dialogs were closed by OK button, exports the report and returns true.
Export(ChartBase, Stream)
Exports the chart to a stream.
Declaration
public void Export(ChartBase chart, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
ChartBase | chart | Chart 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 ShowDialog() method prior to calling this method, or use the "Export(ChartBase chart)" method instead.
Export(ChartBase, String)
Exports the chart to a file.
Declaration
public void Export(ChartBase chart, string fileName)
Parameters
Type | Name | Description |
---|---|---|
ChartBase | chart | Chart 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 ShowDialog() method prior to calling this method, or use the "Export(ChartBase chart)" method instead.
ExportChart()
This method performs actual export
Declaration
protected virtual void ExportChart()
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" |
SetChart(ChartBase)
Sets the reference to a ChartBase.
Declaration
public void SetChart(ChartBase value)
Parameters
Type | Name | Description |
---|---|---|
ChartBase | value | Chart to set. |
ShowDialog()
Displays a dialog with export options.
Declaration
public virtual bool ShowDialog()
Returns
Type | Description |
---|---|
System.Boolean | true if dialog was closed with OK button. |
Start()
This method is called when the export starts.
Declaration
protected virtual void Start()