[]
        
(Showing Draft Content)

C1.WPF.Report.DataSource

DataSource Class

Represnts a data source in a FlexReport.

Namespace: C1.WPF.Report
Assembly: C1.WPF.Report.dll
Syntax
[TypeConverter(typeof(ExpandableObjectConverter))]
public class DataSource : StrongNamedReportObject
Remarks

Most reports specify their data sources by setting the ConnectionString and RecordSource properties. The DataSource object uses these values to connect to a database and retrieve the report data.

Alternatively, you can assign data objects directly to the Recordset property. This approach is more efficient in scenarios where the data has already been loaded by the application for other purposes, and can be used in the report directly instead of loading a copy.

Constructors

Name Description
DataSource()

Initializes a new instance of the DataSource class.

Fields

Name Description
c_DefIsolationLevel

Defines default IsolationLevel for transaction used to get report data.

Properties

Name Description
CalculatedFields

Gets the CalculatedFieldCollection collection defining list of calculated fields for the data source.

CommandTimeOut

Gets or sets the number of seconds to wait before the data connection times out (set to -1 to use the default value, usually 30s).

ConnectionString

Gets or sets the connection string used to open a database.

DataProvider

Gets or sets the type of the data source. The data source type determines the syntaxes of connection string and query (record source). The default is Auto but it is recommended that you set this value to the specific type of the data source you are using, as automatic determining of the data source type may be rather slow.

EncloseParameterValues

Gets or sets a value indicating whether values of parameters in resulting SQL query should be enclosed with delimiters, "#" for dates, "'" for strings, "()" for multivalue parameters. If this parameter is false when all parameters in RecordSource already should be enclosed. For example, EncloseParameterValues == true: RecordSource = "select * from customers where name = CustomerName"; actual SQL query will be: select * from customers where name = 'Some customer'

EncloseParameterValues == false: RecordSource = "select * from customers where name = 'CustomerName'"; actual SQL query will be: select * from customers where name = 'Some customer'

FactoryName

The DbFactoryName string used to open a database.

Filter

Gets or sets the expression used to filter which data rows are included in the report.

FilterSyntax

Gets or sets the type of syntax used in the Filter.

IsolationLevel

Gets or sets the isolation level for DbTransaction used to retrieve the report data.

The default is IsolationLevel.ReadCommitted.

MaxRecords

Gets or sets the maximum number of data rows to be included in the report (zero includes all rows).

ParameterPassingMode

Gets or sets a value indicating how parameter values are passed to the data engine.

ParentReport

Gets the report that contains this DataSource.

RecordSource

Gets or sets a string that specifies which table, stored procedure, or Sql command to use for retrieving the report data.

RecordSourceType

Gets or sets the type of the RecordSource (stored procedure, table, sql query etc.).

Recordset

Sets or gets the data source object that provides data to the report.

SortDefinitions

Gets the SortDefinitionCollection collection defining sort of the data source.

Methods

Name Description
AssignFrom(DataSource)

Assigns (copies) properties from another DataSource to the current object. The name of source object is not copied.

AssignFrom(ReportObject, bool)

Assigns (copies) properties from another DataSource to the current object.

ToString()

Returns the name of the current data source.