[]
        
(Showing Draft Content)

C1.WPF.Report.FlexReport

FlexReport Class

Generates data-based banded reports that can be rendered to printer, preview, or exported to various portable formats (including HTML, PDF and other).

Namespace: C1.WPF.Report
Assembly: C1.WPF.Report.dll
Syntax
public class FlexReport : C1DocumentSource, IComponent, IDisposable, IExecutionContext

Constructors

Name Description
FlexReport()

Initializes a new instance of the FlexReport class.

Properties

Name Description
ActualCulture

Gets the actual culture used in report, returns CurrentCulture if Culture is null.

ActualRightToLeft

Gets the actual right-to-left value that is being used. The value is obtained using the following rules:

  1. If RightToLeft is not null, then that value is used.
  2. If the current report is a sub-report, then ActualRightToLeft of the owner subreport field is used.
  3. Else the value of DefaultRightToLeft static property is used.
AvailableHeight

Gets the height of the remaining area available for sections on the current page. This property can only be used while the report is being rendered in paginated mode (i.e. when IsBusy and C1.WPF.Document.C1DocumentSource.Paginated are true). If IsBusy is false then -1 is returned. If C1.WPF.Document.C1DocumentSource.Paginated is false then double.MaxValue is returned. Note that if used in OnPrint/OnFormat scripts, this value does NOT account for the current section's height. For subreports this property returns AvailableHeight of the master report.

BasePath

Gets or sets the StorageFolder that is used to search for any additional files specified with relative path names. This property is updated automatically when a report is loaded from a file. If you load a report definition from a MemoryStream or via the ReportDefinition property, make sure that WorkingDirectory has the correct value if the report template contains items with relative file names. If this property is null then DefaultBasePath is used, otherwise CurrentDirectory is used.

BehaviorOptions

Gets the BehaviorOptions object containing options controlling the behavior of the report.

Cancel

Specifies whether to cancel generation of the current report.

Credential

Gets or sets the default credential used during rendering of the report.

Culture

Gets or sets the CultureInfo determining the current report culture. This culture is used to convert values to/from strings. By default it is null, in which case the CurrentCulture is used.

CurrentDataScope

For internal use. Specifies the current data scope.

DataSource

Gets or sets a reference to the report's main DataSource, or null if the report is unbound.

DataSourceName

Gets or sets the name of the report's main data source. This name should match the name of a data source in the DataSources collection.

DataSources

Gets the collection of DataSource objects used in report.

DefaultBasePath

Gets or sets the default directory that is used to resolve relative file names. By default this property is null, in which case Environment.CurrentDirectory is used.

DefaultRightToLeft

Gets or sets the value used as the default for the RightToLeft property.

DoEvents

Specifies whether the control should handle Windows messages while rendering reports in synchronious mode.

Document

Gets a C1Document object produced by the current FlexReport during report rendering.

DocumentName

Overriden. Gets the user-frienly name for this FlexReport object.

ExposeScriptObjects

Specifies whether script objects of report should be exposed to subreports.

Features

Overridden. Gets a C1DocumentSourceFeatures object defining features of the FlexReport.

Fields

Gets the collection of Field objects in the report definition.

FileName

Gets the filename that was used to load or save the report.

Font

Gets or sets the default font used by report fields.

Fonts

Gets the data used by report fonts.

FormatVersion

Gets the C1.WPF.Document.Serialization.C1FormatVersion object specifying the version of the report definition files.

GlobalScripts

Gets or sets the global VBScript module. Functions and subroutines defined here (using the standard VBScript syntax) can be used in other scripts in the current report like standard VBScript functions.

Groups

Gets a collection with all the groups in the report.

GrowShrinkMode

Gets or sets the method used to process CanGrow/CanShrink fields.

IgnoreScriptErrors

Specifies whether the component should ignore script errors by default.

LabelOffset

Gets or sets the position of the first label on a partially used sheet.

Layout

Gets a reference to the report's Layout object.

MaxPages

Gets or sets the maximum number of pages allowed for a report.

MeasurementDevice

Gets or sets the type of device used to provide Graphics used to measure/calculate layouts of FlexReport objects, when used GDI/GDI+ functions. If this property is set to Printer, MeasurementPrinterName specifies the printer.

MeasurementPrinterName

Gets or sets the name of the printer used to provide Graphics used to measure/calculate layouts of FlexReport objects, when used GDI/GDI+ functions. This property is only used if MeasurementDevice is set to Printer.

OnClose

Gets or sets the VBScript that is executed when the report finishes rendering.

OnError

Gets or sets the VBScript that is executed when an error occurs.

OnNoData

Gets or sets the VBScript that is executed when the report starts rendering and its source recordset is empty.

OnOpen

Gets or sets the VBScript that is executed when the report starts rendering.

OnPage

Gets or sets the VBScript that is executed when a new page is created.

Overlay

Gets the Watermark object defining properties of the report's overlay.

Page

Gets or sets the current page number.

PageSettings

Overriden. This is shortcut to the page settings returned by the Layout object accessible via the Layout property.

Parameters

Gets a collection of parameters used to generate report.

ParentReport

Gets the main report that contains this subreport (null for main reports).

RecordsPerPage

Gets or sets the number of detail records to render per page or group.

ReportDefinition

Gets or sets an XML string containing the complete report definition.

ReportInfo

Gets or sets a ReportInfo object containing report metadata.

ReportName

Gets or sets the name of the report (used with the Load method).

RightToLeft

Gets or sets a value indicating whether the fields of the report should use right-to-left rules for rendering text.

If null (which is the default), the value of the static property DefaultRightToLeft is used.

This value may be overridden by individual fields.

Sections

Gets the collection of Section objects in the report definition.

SupportedExportProviders

Overridden. Gets an array of exporters supported by the current document source object.

Tag

Gets or sets arbitrary user-defined data.

Watermark

Gets the Watermark object defining properties of the report's watermark.

Methods

Name Description
Clear()

Clears the current report.

CopyDefinitionFrom(FlexReport)

Copies a report definition from another FlexReport component. Please note, subreports referenced from the report via SubreportField or Field are not cloned.

CreateParametersCollection()

Overriden. Creates ReportParameterCollection collection containing list of report parameters.

Evaluate(string)

Evaluates a VBScript expression in the current report context.

Evaluate(string, IReportScriptContext)

Evaluates a VBScript expression.

Execute(string)

Executes a VBScript statement in the current report context.

Execute(string, IReportScriptContext)

Executes a VBScript statement.

GetPageImage(int)

Returns a Metafile representing the specified page.

GetPageImage(int, Graphics)

Returns a Metafile representing the specified page.

GetReportList(XmlDocumentWrapperBase)

Gets a list of reports available in an C1.WPF.Document.Serialization.XmlDocumentWrapperBase.

GetReportList(Stream)

Gets a list of reports available in an XML report definition file.

GetReportList(string)

Gets a list of reports available in an XML report definition file.

GetReportList(XDocument)

Gets a list of reports available in an System.Xml.Linq.XDocument.

GetReportList(XmlDocument)

Gets a list of reports available in an System.Xml.XmlDocument.

Init()

Overridden. Performs additional initializations of this FlexReport instance.

InternalClearContent()

For internal use.

InternalExecuteAction(C1DocumentAction, IExecutionContext)

Should be overriden. Executes an action specified by the C1DocumentAction on the document.

InternalExport(ExportFilter, IExecutionContext)

Should be overriden. Exports current with using specified exporter.

InternalGenerate(IExecutionContext)

Should be overriden. Generates the content managed by this C1DocumentSource.

InternalGetLinkTargetPosition(C1LinkTargetBase, IExecutionContext)

Should be overriden. Returns position of the some position within document.

InternalGetPage(int, IExecutionContext)

Should be overriden. Loads page with specified index.

InternalPrint(C1PrintOptions, IExecutionContext)
InternalValidateParameters(List<ParameterValidationError>, IExecutionContext)

Should be overriden. Validates values of parameters and refreshes their state.

Load(Stream, string)

Loads a report from an XML report definition in stream.

Load(Stream, string, out bool)

Loads a report from an XML report definition in stream.

Load(string)

Load report.

Load(string, string)

Loads a report from an XML report definition file.

Load(string, string, out bool)

Loads a report from an XML report definition file.

Load(XDocument, string)

Loads a report from an System.Xml.Linq.XDocument.

Load(XDocument, string, out bool)

Loads a report from an System.Xml.Linq.XDocument.

Load(XmlDocument, string)

Loads a report from an System.Xml.XmlDocument.

Load(XmlDocument, string, out bool)

Loads a report from an System.Xml.XmlDocument.

OnEndPage(int)

Raises the EndPage event.

OnEndReport()

Raises the EndReport event.

OnGetScriptObject(string)

Raises the GetScriptObject event.

OnLongOperation(double, bool)

Overriden. Raises the LongOperation event

OnNoReportData()

Raises the NoData event.

OnPrintSection(Section)

Raises the PrintSection event.

OnReportDefinitionChanged()

Raises the ReportDefinitionChanged event. Called each time a property on the current report or on any of the contained objects in changed.

OnReportError(int, Exception, bool)

Raises the ReportError event.

OnStartPage(int)

Raises the StartPage event.

OnStartReport()

Raises the StartReport event.

OnStartSection(Section)

Raises the StartSection event.

ParseExpression(string)

Parses a VBScript expression in the current report context.

ParseStatement(string)

Parses a VBScript statement in the current report context.

ReadProp(C1ReaderBase)

Override in derived classes to provide advanced persistence mechanism. Use C1.WPF.Document.Serialization.C1ReaderBase.PropName to determine the name of the current property, use C1ReaderBase.ReadXXX(...) to read property value.

Render()

Renders the report. This method is a shortcut to the Generate() method on the base class.

RenderAsync()

Non-blocking (asynchronous) version of the Render() method. This method is a shortcut to the GenerateAsync() method on the base class.

RenderAsyncEx()

Non-blocking (asynchronous) version of the Render() method. This method is a shortcut to the GenerateAsyncEx() method on the base class.

RenderToFilter(ExportFilter)

Renders the report into an ExportFilter object. This method is a shortcut to the Export(ExportFilter) method on the base class.

RenderToFilterAsync(ExportFilter)

Non-blocking (asynchronous) version of the RenderToFilter(ExportFilter) method. This method is a shortcut to the ExportAsync(ExportFilter) method on the base class.

RenderToFilterAsyncEx(ExportFilter)

Non-blocking (asynchronous) version of the RenderToFilter(ExportFilter) method. This method is a shortcut to the ExportAsyncEx(ExportFilter) method on the base class.

Save(Stream, bool, bool, bool, FontEmbedType)

Saves the current report definition to a stream.

Save(string)

Saves the current report definition to a file.

Save(string, bool, FontEmbedType)

Saves the current report definition to a file.

Save(string, bool, bool, bool, FontEmbedType)

Saves the current report definition to a file.

Save(XmlWriter)

Saves the current report definition to an System.Xml.XmlWriter object.

Save(XmlWriter, bool, FontEmbedType)

Saves the current report definition to an XmlWriter object.

Save(XmlWriter, bool, bool, FontEmbedType)

Saves the current report definition to an XmlWriter object.

Write(C1WriterBase)

Override in derived classes to provide advanced persistence mechanism. Use C1.WPF.Document.Serialization.C1WriterBase methods to write additional object properties.

Events

Name Description
EndPage

Occurs when a page finishes rendering.

EndReport

Occurs when the report finishes rendering.

GetScriptObject

Occurs when an unknown object is found in the report's script or expression.

NoData

Occurs when the report starts rendering and the main report data source is empty.

PrintSection

Occurs before each Section is printed (after it has been formatted.)

RenderCompleted

Occurs when the RenderAsync() method has completed.

ReportDefinitionChanged

Occurs when the current report definition changes.

ReportError

Occurs when an error occurs while rendering a report.

StartPage

Occurs when a new page starts rendering.

StartReport

Occurs when the report starts rendering, before it opens the datasources and checks parameters.

StartSection

Occurs before each Section is formatted.