Rave Report PDF and Intraweb

发布时间 : 星期一 文章Rave Report PDF and Intraweb更新完毕开始阅读

Rave Report PDF and Intraweb — Felix John COLIBRI. ? abstract : how to produce PDF reports, and have an Intraweb site generate and display .PDF

pages,

with multi-user access

? key words : Rave Reports - .PDF report - Intraweb site - DirectDataView - DriverDataView –

Critical Section - Session management

? software used : Windows XP Home, Delphi 2006, Rave Report BE 6.5, Intraweb 8 ? hardware used : Pentium 2.800Mhz, 512 M memory, 140 G hard disc

? scope : Delphi 7, Delphi 8 Delphi 2005, 2006, Turbo Delphi, Turbo 2007, Rad Studio 2007 ? level : Delphi developer ? plan :

Rave Report, PDF and Intraweb o Rave and PDF reports o Intraweb Rave Report

o Multi User Intraweb .PDF report

o

1 - Rave Report, PDF and Intraweb

Intraweb is a very efficient tool for building web sites. Applications, mainly in the business area, also require

some report output. And with the current versions of Delphi, Rave Report is the candidate of choice. This article will present how to build Rave reports in PDF format from an Intraweb page.

2 - Rave and PDF reports

2.1 - simple Rave Report

Let's first create a simple Rave report hooked to some Table. We will use the EMPLOYEE Table, and to keep

the data source simple, we will use the .XML file. Therefore:

create a path for the project, and copy the EMPLOYEE.XML file from:

C:Program Files\\Common Files\\Borland Shared\\Data\\ to a _DATA folder near your project folder

create a new Delphi Win32 application, with \| New | Vcl Application Win32\

and save it in your application folder

from the Tools Palette \Access\tab, drop a tClientDataSet on the Form

set its FileName property to the path and file name of the EMPLOYEE.XML file,

and toggle Active to True

drop a tDataSource on the Form, and connect its DataSet to ClientDataSet1

from the \tDbGrid and connect its DataSource to

DataSource1

the EMPLOYEE data is displayed

Note that the tDbGrid is not necessary for the rest of this project, but allows us to easily check that everything

is correctly initialized.

Now drop the Rave components on the Delphi side:

from the Rave tab, drop a tRvProject on the Form

then drop a tRvDatasetConnection, and connect its DataSet connection to

ClientDataset1

2.2 - Using the Rave Designer

To build our report, we will use the Rave Designer

double click on the RvProject1

the Rave Designer is displayed

For those unfamiliar with the Rave Designer:

? ? ? ? ? ?

1 is the menu 2 the toolbar 3 the Palette

4 the Object Inspector 5 the design area

6 the component Treeview

Also note that the Rave Designer is a separate .EXE (which can be launched from Delphi's BIN directory), which has a life of its own. It can be used independently from Delphi, and when we build reports we will

have

save the report in a file with a .RAV extension, and we will have to reference this file in Delphi to use this report layout.

We will create the Dataview which allows us to get access to our tDataSet:

select \

a new rave design project is created

select \

a dialog with different data view connections is presented

select \

a dialog with the only tRvDataSetConnection available, which

is RvDataSetConnection1, is displayed

select this connection and click \

a new DataView1 is added to the TreeView \

fields of ClientDataSet1

We will build a report layout with the rows of this DataView1:

from the Designer Palette, select \| Region Component\and drop it in the

middle of the designer area

select a DataBand, and drop it on the Region1

In the Object Inspector

set its DataView property to DataView1

? select its BandStyle property and click on the ellipsis ... ? a Band Style Editor is displayed

? check the \

?

in the TreeView, open the DataView1 node, to display all the fields

Then

Ctrl-Drag-and-Drop (push Control, click on a field, drag and drop it with

Control

联系合同范文客服:xxxxx#qq.com(#替换为@)