Home » Developer & Programmer » Reports & Discoverer » Can anyone help me ? urgent!
Can anyone help me ? urgent! [message #90030] Mon, 04 October 2004 22:18 Go to next message
eboy
Messages: 17
Registered: August 2004
Junior Member
HAI, Can anyone help me on report on calculating the total_hr

- IC -
- TOTAL_HR -
- DATE_1 -

- 123 -
- 10:20:30 -
- 05-OCT-2004 -

- 123 -
- 15:10:15 -
- 06-OCT-2004 -

- 123456 -
- 11:10:10 -
- 05-OCT-2004 -

- 123456 -
- 15:10:15 -
- 06-OCT-2004 -

- 147 -
- 10:56:21 -
- 06-OCT-2004 -

TABLE NAME = TESTING

TOTAL_HR VARHCAR2(10)

date_1 date;

function totalFormula return Number is
OVERAL_total number;
x number;


begin

select SUM(to_number(substr(:total_hr,1,2))) into X from TESTING where ic = '123'  and DATE_1 BETWEEN '05-OCT-2004'AND '06-OCT-04';

OVERAL_total:= x ;
return(OVERAL_total);
end;


if i run this report with above statement, the total hr for ic(123) is = 20 and not 25.

why it cannot read to the next record which is on 06-oct-2004?

how to calculate the total hr for 05-oct-2004 and 06-oct-2004 with ic = 123. (just take 1st and 2nd digit for example)

can anyone help me.

thanks

regards

eboy

 

 
Re: Can anyone help me ? urgent! [message #90031 is a reply to message #90030] Tue, 05 October 2004 06:20 Go to previous messageGo to next message
raviranjan
Messages: 41
Registered: April 2004
Member
tryu it ... it will give yr answer

select SUM(to_number (substr(to_char(:total_hr),1,2))) into X from TESTING where ic = '123' and DATE_1 BETWEEN '05-OCT-2004'AND '06-OCT-04';
help [message #90032 is a reply to message #90030] Tue, 05 October 2004 18:38 Go to previous message
sam k
Messages: 23
Registered: September 2004
Junior Member
Hi !
I have got a table called - Transactions
and one of the field in it is Revenue which stores currentmonth,last 2 months data in to it.

I have got a word format report looks like below

Transactions

currentmonth 1monbefore 2monbefore
Revenue $xxxxxx $xxxxxx $xxxxxx

how to get current,1monbefore,2monbefore data from the table into crystal report
cud u plz send me asap
thx in adv
Previous Topic: Displaying the Output of Reports in Grids
Next Topic: control break report
Goto Forum:
  


Current Time: Sun May 05 17:44:56 CDT 2024