Home » Developer & Programmer » Reports & Discoverer » Ladger balance ?? urgent
Ladger balance ?? urgent [message #206443] Thu, 30 November 2006 01:40 Go to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Dear SIr

I have created a report but there is mistak in total


See attached pic.

[Updated on: Thu, 30 November 2006 05:40]

Report message to a moderator

Re: Ladger balance ?? [message #206463 is a reply to message #206443] Thu, 30 November 2006 03:18 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

Dear Kamran,
It seems somhow allready a calculated value as u mentioned the value you calculated from the formula
33180-660=32520
and now you need a grand total(M I Right?) but first tell me what should be the Total ? I presume it 65100 is it Correct? Please Do post ur Query and before posting any of the ScreenShot make sure it is in JPG so that members can download things easily.ur previously sent BMP was of 1.22 MB So it Takes along to Download.

Regards
Jak
Re: Ladger balance ??plz urgent [message #206479 is a reply to message #206463] Thu, 30 November 2006 04:29 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member

It not proper calculation let me explain.

Actual you see in picture Balance KGS is 33180

When we minus plan kgs 660 balace = 32520
and now again repeating this formula in 2nd row. not right
2nd row balance should be 32520-600=31980 but report getting total is 32580.

this is a problem

[Updated on: Thu, 30 November 2006 05:18]

Report message to a moderator

Re: Ladger balance ??plz urgent [message #206499 is a reply to message #206479] Thu, 30 November 2006 05:39 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
I am waiting plz
Re: Ladger balance ??plz urgent [message #206525 is a reply to message #206479] Thu, 30 November 2006 07:48 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
hi kamran,

I understand ur problem you have to do some pl/sql to achieve output ... pl send me the rdf i must try ...

bye
Ashu
Re: Ladger balance ??plz urgent [message #206630 is a reply to message #206525] Thu, 30 November 2006 22:19 Go to previous messageGo to next message
kamran.it
Messages: 265
Registered: September 2005
Location: Karachi
Senior Member
Dear Ashu

Please find attached herewith the rdf file



I used this code but row 2 not showing balance , showing null value

function CF_3Formula return Number is
bal number;
begin
	  if :cs_row = 1 or :cs_row =0 then
	      	bal:=:cf_2-:cf_1 ;
    	return (bal);
   elsif :cs_row > 1 then
  	   return(bal);
  end if;
end;

[Updated on: Fri, 01 December 2006 05:58]

Report message to a moderator

Re: Ladger balance ??plz urgent [message #207261 is a reply to message #206630] Mon, 04 December 2006 21:18 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
hi Kamran,

I don't have the test data but i am trying creating a dummy table and dat ...

bye
ashu

[Updated on: Mon, 04 December 2006 21:18]

Report message to a moderator

Re: Ladger balance ??plz urgent [message #207273 is a reply to message #206630] Mon, 04 December 2006 22:20 Go to previous message
kkinapps
Messages: 29
Registered: November 2006
Location: Hyderabad
Junior Member

Hi kamran

plz try this code it works
Actually the problem in ur code is(i think) as your declaring a local variable bal it get's declared and posesses null value evrytime the formula column code is called.
So the second return statement return(bal) in your code will definitely return null value so try using a placeholder column instead.

function CF_3Formula return Number is
begin
if :cs_row = 1 or :cs_row =0 then
:bal:=:cf_2-:cf_1 ;
return (:bal);
elsif :cs_row > 1 then
:bal:=:bal-:cf_1;
return(:bal);
end if;
end;

Note:where :bal is a place holder column

Hope this solves ur problem

Bye
KK
Previous Topic: Connecting to Oracle Reports (9i or higher) to a DB2 database
Next Topic: Want to order by at run time?but problem is this that i have 2 different datatypes
Goto Forum:
  


Current Time: Fri Nov 29 23:19:10 CST 2024