VectorSoft Reports
ARWordReport & ARExcelReport
Borland Delphi & C++Builder components

 
Home
News
ARWordReport
    Introduction
    Samples
ARExcelReport
    Introduction
    Quick Start
Download
FAQ
Ordering
Guest Book

News:

18 feb 2016
ArExcelReport version 2.4
24 jan 2016
ARWordReport version 2.3


Allsoft.ru - магазин софта
 


ARExcelReport.
Quick start.

Let`s look how to start using ARExcelReport with simple example.

Task: you have to generate simple Excel report with customers list (we`ll use 'customers' table from 'DBDEMOS' Delphi sample database).

1) Since 'customers' dataset structure are known you may create the report template using MS Excel:

Template

<#date1> tag will be replaced with current date.
Row with <#table:customer> tag and the next row is future table template.
COUNT(<#customers.*) tag will be replaced with 'customers' dataset records count.

See ARExcelMarkup.doc from component package for full list of template markup abilities.

Save this template (simple Excel document) as 'template-customers.xls'.

2) Drop Button1 component, Table1 component on form (DatabaseName='DBDEMOS', TableName='Customers.db', Active=True)

3) Drop ARExcelReport component on form, set Filename='template-customers.xls'.

4) Add DataSetList Item linked to Table1 and assign 'Customers' name to it:

This DSName 'CUSTOMERS' you`ll be able to use in report template as Table1 alias.

5) Add Button OnClick handler:

procedure TForm1.Button1Click(Sender: TObject);
begin
  //Addind <#data1> tag value
  ARExcelReport1.CustTagValues.Clear;
  ARExcelReport1.CustTagValues.Add('date1='+DateTimeToStr(now));
  //Preview report
  ARExcelReport1.Preview;
end;

6) Run application and press 'Preview' button. Report is complete!

Also you can use template-specific datasets defined in DataPool object in report template. You can use ARExcelReport.CustTagValues as well as other datasets fields within SQL statments in DataPool. See Demo projects from component package to find out how it works.

Top


 

©Anton Ryazanov, 1999-2016
URL: www.vector-ski.com/reports
E-mail: vsoft@vector-ski.ru