Class TextExport
Represents the text export.
Inheritance
Implements
Inherited Members
Namespace: FastReport.Export.Text
Assembly: FastReport.dll
Syntax
public class TextExport : ExportBase, IComponent, IDisposable, IFRSerializable
Constructors
TextExport()
Initializes a new instance of the TextExport class.
Declaration
public TextExport()
Properties
AvoidDataLoss
Enable or disable the Data loss avoiding. Auto calculation of ScaleX and ScaleY will be launched when dialogue window will be off.
Declaration
public bool AvoidDataLoss { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Copies
Gets or sets the count of copies for printing of results.
Declaration
public int Copies { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DataLossBreak
Declaration
public bool DataLossBreak { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DataOnly
Enable or disable the data only output without any headers. Default value is false.
Declaration
public bool DataOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DataSaved
Declaration
public bool DataSaved { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
EmptyLines
Enable or disable the output of empty lines in resulting document. Default value is false.
Declaration
public bool EmptyLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Encoding
Gets or sets the encoding of resulting document.
Declaration
public Encoding Encoding { get; set; }
Property Value
Type | Description |
---|---|
System.Text.Encoding |
Examples
Windows ANSI encoding
TextExport.Encoding = Encoding.Default;
Unicode UTF-8 encoding
TextExport.Encoding = Encoding.UTF8;
OEM encoding for current system locale sessings
TextExport.Encoding = Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage);
Frames
Enable or disable frames in resulting document. Default value is true.
Declaration
public bool Frames { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PageBreaks
Enable or disable the breaks of pages in resulting document. Default value is true.
Declaration
public bool PageBreaks { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PageHeight
Declaration
public int PageHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PageWidth
Declaration
public int PageWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PreviewMode
Declaration
public bool PreviewMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PrintAfterExport
Enable or disable the printing results after export.
Declaration
public bool PrintAfterExport { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PrinterName
Gets or sets the printer name for printing of results.
Declaration
public string PrinterName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PrinterType
Gets or sets the active index of registered printer type.
Declaration
public int PrinterType { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PrinterTypes
Gets or sets the list of printer types. TextExportPrinterType
Declaration
public List<TextExportPrinterType> PrinterTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<TextExportPrinterType> |
ScaleX
Gets or sets the scale by X axis for correct text objects placement.
Declaration
public float ScaleX { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
ScaleY
Gets or sets the scale by Y axis for correct text objects placement.
Declaration
public float ScaleY { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
TextFrames
Enable or disable the text (non graphic) frames in resulting document. Default value is false.
Declaration
public bool TextFrames { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CalculateScale(Object)
Calculates scale.
Declaration
public void CalculateScale(object progress)
Parameters
Type | Name | Description |
---|---|---|
System.Object | progress |
ExportBand(BandBase)
This method is called for each band on exported page.
Declaration
protected override void ExportBand(BandBase band)
Parameters
Type | Name | Description |
---|---|---|
BandBase | band | Band, dispose after method compite. |
Overrides
ExportPage(Int32)
Exports the page.
Declaration
public string ExportPage(int pageNo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageNo |
Returns
Type | Description |
---|---|
System.String |
ExportPageBegin(ReportPage)
This method is called at the start of exports of each page.
Declaration
protected override void ExportPageBegin(ReportPage page)
Parameters
Type | Name | Description |
---|---|---|
ReportPage | page | Page for export may be empty in this method. |
Overrides
ExportPageEnd(ReportPage)
This method is called at the end of exports of each page.
Declaration
protected override void ExportPageEnd(ReportPage page)
Parameters
Type | Name | Description |
---|---|---|
ReportPage | page | Page for export may be empty in this method. |
Overrides
Finish()
This method is called when the export is finished.
Declaration
protected override void Finish()
Overrides
GetFileFilter()
Returns a file filter for a save dialog.
Declaration
protected override string GetFileFilter()
Returns
Type | Description |
---|---|
System.String | String that contains a file filter, for example: "Bitmap image (.bmp)|.bmp" |
Overrides
ShowDialog()
Displays a dialog with export options.
Declaration
public override bool ShowDialog()
Returns
Type | Description |
---|---|
System.Boolean | true if dialog was closed with OK button. |
Overrides
Remarks
Before calling this method, set the report.
Start()
This method is called when the export starts.
Declaration
protected override void Start()