Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rave Reports and Sum(xxx)

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
I have a question to ask about Rave Reporter 5.0

I am using Delphi 7, Rave 5.0 & Access 2000

What i wish to do is to create a rave report that displays three things...

The TOTAL SUM of the field 'Call_Length' format integer
The TOTAL SUM of the field 'Cost_To_Business' format currency
The TOTAL SUM of the field 'Cost_To_Customer' format currency

So a simple thing like this

TOTALS [Title]
Total Call Cost 2 Bus Cost 2 Cust [Headings]
---------- ---------- -----------
1500 sec $25.00 $36.15 [Sum's]


But i haven't got an idea how to do it.
 
Do you need help getting SUMS? You can do that with SQL code that would look like this...

SQL.Clear;
SQL.ADD('select sum(T."Call_Length") from YourTable T');
DisableControls;
Open;
EnableControls;
if Fields[0].isNull then
TotalCall := 0.0
else
TotalCall := Fields[0].Value;

I use the ReportPrinter components of Rave because they give me all the print control I need. Use something like the following...

with Sender as TBaseReport do
begin
gYPos := gYPos + 0.2;
GoToXY(1.5,gYPos);
if gYPos > 10.1 then
begin
NewPage;
gYPos := 1.2;
end;
PrintLeft('Total Calls',1.5);
gYPos := gYPos + 0.2;
GoToXY(1.5,gYPos);
PrintLeft(IntToStr(TotalCall),1.5);
End;

That's just a sample. See if that helps any.

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top