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


XLReport class - AfalinaSoft Active XL Report Programmer's Reference

<< Previous

Table of contents

Next >>


XLReport class

Represents the report generator containing properties and methods used in Excel reporting.


XLReport Properties


ActiveSheet (read/write)

Returns or sets the name of the worksheet to be activated after report generation.

Property ActiveSheet As String

To guarantee activation of a certain worksheet in a report, you should specify the name of the worksheet in this property. If this property contains an empty string then Active XL Report activates the worksheet that was last active in the template. Example:

ocxXLReport.ActiveSheet = "Main sheet"

Build (read only)

Returns the current build number of Active XL Report

Property Build As String

DataExportMode (read/write)

Returns or sets the value specifying the data transfer algorithm (default: xlrExportDDE).

Property DataExportMode As DataExportModeConstants
Enum DataExportModeConstants
xlrExportCSV = 0
xlrExportVariant = 1
xlrExportDDE = 2
End Enum

Active XL Report supports three alternate data transfer methods:

Method

Comments

xlrExportVariant

Data portions are transferred in a variant array with direct assigning of its values to cells. Usually this method is the slowest one. XL Report core uses it in some situations. Because of an error in Excel algorithms in all Excel versions, strings longer than about 1800 characters are truncated. There also are some problems with data type recognition, e.g. the "00033" string can be recognized as a number. This method is left for compatibility with previous versions of XL Report.

xlrExportCSV

Data portions are transferred through the Clipboard in CSV format. Middle speed of data transfer. There are some problems with data type recognition, e.g. the "3/7" string can be replaced with either a result of division or with a date. Use this method with long strings (the limit is 8 Kb).

xlrExportDDE

The default method. Data portions are transferred using Fast DDE Table Format. The fastest method because it uses Excel native data types. Data type recognition problems were not observed. Strings longer than 255 characters are truncated.

Example:

ocxXLReport.DataExportMode = xlrExportVariant

Datasources (read only)

Allows access to the collection of datasources (XLRDatasources class) for the current XLReport object.

Property Datasources As XLRDatasources

See also: XLRDatasources class.

Debug (read/write)

If set to True (-1), visualizes some stages of report generation and allows to unhide (Format|Sheet|Unhide menu in Excel) some debug output at the "XLReport_Temporary" worksheet.

Property Debug As Boolean

Default value: False (0).

DisplayAlerts (read/write)

If set to True (-1), Active XL Report displays Excel error messages while processing the report.

Property DisplayAlerts As Boolean

Default value: True (-1).

Edition (read only)

Returns the current edition of Active XL Report.

Property Edition As String

ExcelInstance (read/write)

Specifies whether Active XL Report should use running or create new instance of Excel (default: xlrRunningOrNew).

Property ExcelInstance As ExcelInstanceConstants
Enum ExcelInstanceConstants
xlrRunningOrNew = 0
xlrNewInstance = 1
End Enum

MacroAfter (read/write)

Returns or sets the full name of an Excel macro to be invoked after generating a report.

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.MacroAfter = "Module1.BuildChart"

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

MacroBefore (read/write)

Returns or sets the full name of an Excel macro to be invoked before generating a report.

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.MacroBefore = "Module1.DoBuildRange"

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

MultisheetFieldName (read/write)

Returns or sets the filed name for multiple-sheet reports.

Property MultisheetFieldName As String

This property works in pair with the MultisheetSourceName property. They indicate the datasource used for multiple-sheet report creating (every record of its dataset causes generation of a separate worksheet) and the name of the field used for naming such worksheets.

When positioning on the current record (including the first one) of a multisheet-datasource Active XL Report fires the AfterMasterMoveNext event for every top-level Range-datasource of master-detail datasource hierarchy. In the event procedure, you should specify the data for such datasources (they are regarded as implicit detail-datasources) corresponding to the current record in the multisheet-datasource (which is regarded as an implicit master-datasource).

See also: XLReport.MultisheetSourcename property, XLReport.AfterMasterMoveNext event.

MultisheetSourceName (read/write)

Returns or sets the datasource name for multiple-sheet reports.

Property MultisheetSourceName As String

This property works in pair with the MultisheetFieldName property. They indicate the datasource used for multiple-sheet report creating (every record in its dataset causes generation of a separate worksheet) and the name of the field used for naming such worksheets. The datasource used as a multisheet-datasource must be a NoRange-datasource and cannot participate in master-detail hierarchy of datasources.

When positioning on the current record (including the first one) of a multisheet-datasource Active XL Report fires the AfterMasterMoveNext event for every top-level Range-datasource of master-detail datasource hierarchy. In the event procedure, you should specify the data for such datasources (they are regarded as implicit detail-datasources) corresponding to the current record in the multisheet-datasource (which is regarded as an implicit master-datasource).

See also: XLReport.MultisheetFieldname property, XLReport.AfterMasterMoveNext event.

Params (read only)

Allows access to the list of report parameters (XLRParams class) for the current XLReport object.

Property Params As XLRParams

See also: XLRParams class.

ReportBookName (read/write)

This property allows specifying the path and file name of a workbook where the report will be saved to. If the workbook doesn't exist it will be created.

Property ReportBookName As String

If this property isn't set, the name of resulting workbook is determined by Excel - by adding a sequential number to the name of a template workbook. This property is used by the Report, ReportTo, and Report2 methods.

See also: XLReport.Template property, XLReport.Report method, XLReport.ReportTo method, XLReport.Report2 method.

SaveClipboard (read/write)

Indicates whether Active XL Report should restore the contents of the Clipboard after data transfer.

Property SaveClipboard As Boolean

Default value: False (0).

Template (read/write)

Returns or sets the path and file name of a template workbook.

Property Template As String

Example:

ocxXLReport.Template = "C:\My Templates\Report1.xls"
ocxXLReport.Template = ".\Report1.xls"

See also: XLReport.Edit method, XLReport.Report method, XLReport.ReportTo method.

Temporary (read/write)

If set to True (-1), Active XL Report creates the report workbook in the directory designated for temporary files.

Property Temporary As Boolean

Default value: False (0).

Version (read only)

Returns the version number of Active XL Report ActiveX Control.

Property Version As String

<< 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