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 Methods - AfalinaSoft Active XL Report Programmer's Reference

<< Previous

Table of contents

Next >>


XLReport Methods


AboutBox

Opens the About dialog box.

Sub AboutBox()

Edit

Opens the template supplied in the Template property.

Sub Edit()

If the Template property contains an empty string, Active XL Report launches Excel with a new workbook open. Example:

ocxXLReport.Edit

See also: XLReport.Template property.

Report

Creates a report based on the template specified in the XLReport.Template property. Allows supplying all or any number of datasources with datasets.

Sub Report([Datasets])

The Datasets optional parameter contains an array of Variants. Each item in the array must be a dataset corresponding to the appropriate item of the XLRDatasources collection: the first item in the array (or the only parameter of the method) corresponds to the first datasource (of index 0) in the XLRDatasources collection; the second item corresponds to the second datasource (of index 1), and so on. Some (but not all) items can be omitted. In this case, you should supply corresponding datasources with datasets using the XLRDatasource.Dataset property. In order to supply the first or the only datasource with dataset, the Datasets parameter can be a dataset itself (i.e. not necessary an array of datasets). Examples:

ocxXLReport.Report
ocxXLReport.Report dstCustomers
ocxXLReport.Report Array(dstDataset1, dstDataset2, , dstDataset4)

To save the report workbook under new name use the XLReport.ReportBookName property.

See also: XLRDatasource.Dataset property, XLReport.Template property, XLReport.ReportBookName property, XLReport.ReportTo method, XLReport.Report2 method.

ReportTo

Creates a report based on the template specified in the XLReport.Template property. Allows supplying all or any number of datasources with datasets. Adds report worksheet(s) to a given workbook.

Sub ReportTo(WorkbookName As String, [Datasets])

The Datasets optional parameter contains an array of Variants. Each item in the array must be a dataset corresponding to the appropriate item of the XLRDatasources collection: the first item in the array (or the only parameter of the method) corresponds to the first datasource (of index 0) in the XLRDatasources collection; the second item corresponds to the second datasource (of index 1), and so on. Some (but not all) items can be omitted. In this case, you should supply corresponding datasources with datasets using the XLRDatasource.Dataset property. In order to supply the first or the only datasource with dataset, the Datasets can be a dataset itself (i.e. not necessary an array of datasets).

To save the report workbook under new name use the XLReport.ReportBookName property.

See also: XLRDatasource.Dataset property, XLReport.Template property, XLReport.ReportBookName property, XLReport.Report method, XLReport.Report2 method.

Report2

Creates a report based on the template specified in the XLReport.Template property. Allows supplying all or any number of datasources with datasets.

Sub Report2([Workbook], [Datasets], [ExcelApp])

All the parameters are optional. The Workbook parameter can accept a string containing the path and file name of a workbook, where the report worksheets should be added to. Besides, you can pass an object variable referencing a previously opened workbook in this parameter. The Datasets is described in the XLReport.Report method. If you work with several instances of Excel, specify the instance you need in the ExcelApp parameter.

To save the report workbook under new name use the XLReport.ReportBookName property.

Samples. In all the samples it is assumed that when the Report2 methodis called, the datasets are already assigned.

Generate a report.

ocxXLReport.Report2

Add a report to an existing workbook.

ocxXLReport.Report2 "C:\Book1.xls"

Add a report to the previously opened workbook.

Dim objWorkbook as Excel.Workbook
Set objWorkbook = ...
...
ocxXLReport.Report2 objWorkbook
Generate a report using a given instance of Excel.Application.
Dim objExcel as Excel.Application
Set objExcel = ...
...
ocxXLReport.Report2 , , objExcel
Add a report to an exisiting workbook and save the result under new name.
ocxXLReport.ReportBookName = "C:\Book2.xls"
ocxXLReport.Report2 "C:\Book1.xls"

See also: XLRDatasource.Dataset property, XLReport.Template property, XLReport.ReportBookName property, XLReport.Report method, XLReport.ReportTo method.

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