Microsoft Excel reporting and 
 data analyzing with practically no coding. 
 .Net, ActiveX, and VCL versions. 
 www.AfalinaSoft.com  

Home    Products    Downloads    Registered users    Support    Prices    Order    Primary Subscription

 

MS Office COM Add-ins. Microsoft Excel reporting 
 and data analyzing


XLRDatasource class - AfalinaSoft Active XL Report Programmer's Reference

<< Previous

Table of contents

Next >>


XLRDatasource class

Represents a datasource for the current instance of XL Report. Its main purpose is to bind a dataset to a report


XLRDatasource Properties


Dataset (read/write)

Returns or sets the dataset of the current datasource object.

Property Dataset As Variant

A dataset is a data set of a certain type. The current set of supported dataset types can be found in the DatasetTypes enumeration in the Object Browser. For a newly created datasource object, it contains the Empty value.

See also: XLRDatasources class, XLRDatasource.DatasetType property, XLReport.Report method, XLReport.ReportTo method.

DatasetType (read/write)

Returns or sets the type of a dataset. The current set of supported dataset types can be found in the DatasetTypes enumeration in the Object Browser. For a newly created datasource object, it contains the xlrADORecordset value.

Property DatasetType As DatasetTypes
Enum DatasetTypes
xlrDAORecordset = 1
xlrADORecordset = 2
xlrUnboundDataset = 3
xlrRDOResultset = 4
End Enum

See also: XLRDatasource.Dataset property.

Enabled (read/write)

Returns or sets the state (enabled/disabled) of the datasource object.

Property Enabled As Boolean

This property can be useful in report debugging.

Index (read only)

Returns the order number of the datasource in the Datasources collection.

Property Index As Long

See also: XLRDatasources class.

MacroAfter (read/write)

Returns or sets the full name of the Excel macro to be invoked after transferring the data of the current datasource.

Property MacroAfter As String

The full name includes the name of a module, dot, and the name of a procedure. The procedure must be declared public. Example:

ocxXLReport.Datasources(0).MacroAfter = "Module1.BuildChart"

See also: XLRDatasource.MacroBefore property, XLReport.MacroAfter property, XLReport.MacroBefore property.

MacroBefore (read/write)

Returns or sets the full name of the Excel macro to be invoked before transferring the data of the current datasource.

Property MacroBefore As String

The full name includes the name of a module, dot, and the name of a procedure. The procedure must be declared public. Example:

ocxXLReport.Datasources(0).MacroBefore = "Module1.DoBuildRange"

See also: XLRDatasource.MacroAfter property, XLReport.MacroAfter property, XLReport.MacroBefore property.

MasterSourceName (read/write)

Returns or sets the name of the master datasource object for the current datasource object.

Property MasterSourceName As String

Use the MasterSourceName property in master-detail reporting. You link two datasources by specifying this property for a child datasource.

ocxXLReport.Datasources("Orders").MasterSourceName = "Customers"

See also: XLReport.AfterMasterMoveNext event.

Name (read/write)

Returns or sets the name of the datasource object.

Property Name As String

Because the Name property is the default property of the XLRDatasource class, the following two statements are equivalent:

ocxXLReport.Datasources(0).Name = "Datasource1"
ocxXLReport.Datasources(0) = "Datasource1"

Range (read/write)

Returns or sets the name of a target range for the current datasource.

Property Range As String

To transfer the dataset records into a certain range of workbook you must name the range and specify the name in the Range property of the datasource. The cells of this range can contain field formulas on the =DatasourceName_FieldName pattern. We describe the format of Active XL Report ranges in Developer's Guide. If the Range property contains an empty string, Active XL Report transfers the current record only.

<< Previous

Table of contents

Next >>



Components

axlr axlr.ocx

Data Access methods

  • ADO
  • DAO
  • RDO
  • custom data

Excel version supported

MS Excel 97 (SR2)
MS Excel 2000
MS Excel 2002 (XP)
MS Excel 2003



[ Download it ]
[ Order now ]

Copyright © 1999-2006
All right reserved.
Privacy Policy

Write to WebMaster

Page Top
Add-in Express - COM Add-ins, Smart Tags and RTDS in C#, VB, C++, J#, and Delphi