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!

Summarising Formula for based on the group Summaries

Status
Not open for further replies.

melbenmartin

IS-IT--Management
Dec 16, 2009
13
IN
Hi I am Novice in crystal report .

Your help will be hightly appreciatable . Thanks in advance.

See ,I have one report

Group Field - Tbl_Transaction.BillDate
Summary Field is - TBL_transaction.Credit
Summary Field is - tbl_transaction.debit

when the report generate,

I need to display the Report Like this .

Opening Balance 2000.00

12/12/2009
----------

Particulars Debit Credit
----------- ------ -------
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
------------------------
Group Summary 1000.00 30000.00(CreditGroupSumary + Opening Balance)
--------------------------------------------
C/D Balance is 2000.00 (CreditGroupSummary - debit GroupSummary)


13/12/2009
---------- (2000.00) +
Particulars Debit Credit
----------- ------- -------
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00

Here I have to add the previous c/d Balance to the next groups Credit Summary .. and the same logic will continue for the subsequent groups ..

Plese help me how to do this functionality . Thanks in advance.

Please note : I could add the Opening Balance to the first groups credit summary ..

But i am not able to add c/d Balance to the next groups credit summary .. please help me on this as its very urgent
 
Group summaries are just that, cleared when the group finishes.

If the number of groups is known and limited, you could handle it by running totals.

Otherwise you might manage it using variables, a variable in the group footer that takes a value from a group and holds it till the end of the next group.

The use of Crystal's automated totals is outlined at FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
I'm not following your sample data. It looks like the Credit summary totals $500 and the debit summary totals $1000, so how are you getting $3000? Or did you mean Debit group summary plus opening balance? And why are you showing the $2000 c/d balance as a negative in the following group?

-LB
 
Ohh sorry LBASS,

Plz Just Look into this

Opening Balance 2000.00

12/12/2009
----------

Particulars Debit Credit
----------- ------ -------
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
------------------------
Group Summary 1000.00 2500.00(CreditGroupSumary + Opening Balance)
--------------------------------------------
C/D Balance is 1500.00 (CreditGroupSummary - debit GroupSummary)


13/12/2009
---------- (1500.00) +
Particulars Debit Credit
----------- ------- -------
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00
some texts 200.00 100.00

I hope you will get the logic .

Can you plz send me the logic how to perform this .. Really it will be very helpful to me ..

Thanks in Advance ..

 
Hi Madawc ,

Thanks for your solution , and it would be greatly appreciable if you send me the logic with code sample.

so that I can improve that from as per the requirement ....

Thanks a lot for your time once again ..

Really very urgent .. i am very very Novice to the Crystal report ..
 
We all learn by experimenting with code. Adapt and see what works on your own data.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Set up the c/d formula like this:

whileprintingrecords;
numbervar cdbal;
numbervar prevcdbal := cdbal;
If groupnumber = 1 then
cdbal := {opening.balance} + sum({table.credit},{table.date})-sum({table.debit},{table.date}) else
cdbal := prevcdbal + sum({table.credit},{table.date})-sum({table.debit},{table.date});
cdbal;

This assumes you have only one group.

-LB
 
Hi LBASS ,

Thanks a ton .Great to have you in this forum .. nice man God Bless you ..

Regards,
Simon .
 
HI Madawc ,

Thanks a lot for your help and advice too .. Great keep up the good work .

Regards,
Simon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top