BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

 
Realtime CMS Reporting from Infolytik (Opens a new window)  

General Notice: No events within the next 45 days.

Calculate the margin of two group totals


 
Search this topic... | Search Crystal Reports... | Search Box
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Author Message
Sephiroth
Forum Member
Forum Member



Joined: 18 Dec 2010

Posts: 3



PostPosted: Sat Dec 18, 2010 12:13 pm 
Post subject: Calculate the margin of two group totals

Hello experts,

can you please help me solve my issue?
I would like to simply calculate the balace of my incoming and outgoing cash payments.

I have a report which is grouped by the direction (incoming, outgoing) of cash.

I have the to group totals (sum incoming cash) and sum (outgoing)
I need the sum(incoming)-sum(outgoing) value? Can you please give me some advice, I am really new with crystal reports.

Thanks in advance!
Back to top
kuldeep_ghosh
Forum Member
Forum Member



Joined: 17 Dec 2010

Posts: 5



PostPosted: Sat Dec 18, 2010 2:13 pm 
Post subject: Re: Calculate the margin of two group totals

you have to use the summary option provided under insert tab.

summary option will give the sum of incoming as well as outgoing call. and place the summary values in group footer and then create a formula to subtract the values .
Back to top
Sephiroth
Forum Member
Forum Member



Joined: 18 Dec 2010

Posts: 3



PostPosted: Sat Dec 18, 2010 4:18 pm 
Post subject: Re: Calculate the margin of two group totals

it is ok, but how to do the extraction?i cannot create the formula, since the is only one sum in the designer... i do not have to columns for the outgoing and incoming cash
Back to top
BO_Chief
Forum Fanatic
Forum Fanatic



Joined: 06 Jun 2004
ASUG Icon
Posts: 5524
Location: Somewhere on God's Land.


flag
PostPosted: Sat Dec 18, 2010 10:48 pm 
Post subject: Re: Calculate the margin of two group totals

If I understood correctly. Create two formula fields in your report:-

v_SumIncoming and v_SumOutgoing.

In v_SumIncoming variable editor:
Code:
If GroupName({YourGroupFieldName})="Incoming" Then
           {#R_Amount}


In v_SumOutgoing variable editor:
Code:
If GroupName({YourGroupFieldName})="Outgoing" Then
           {#R_Amount}


Note : {#R_Amount} is running total field.

Subtract them to get the difference.

Hope that helps.

_________________
help us help you! make sure your post has the following elements:
Does it include BO version, Database, an error, a problem, a SQL for object or Condition ?
Does it include some sample data what you have?
Does it include any code you already tried ? (working or not..)
Did you explain what you want for results?
If any of those elements are missing,chances are you didn't post enough information for us to help you!
Back to top
Sephiroth
Forum Member
Forum Member



Joined: 18 Dec 2010

Posts: 3



PostPosted: Thu Dec 23, 2010 6:56 am 
Post subject: Re: Calculate the margin of two group totals

Dear BO_chief,

i followed your guide, i was not able to handle it.
But i have found an other way, which is a bit easier for me.

Under SQL i multiplied the outgoing values by (-1) than i can simply get the balance of incoming and outgoing cash amounts.

Thanks for your help anyway!

I wish everyone Merry Christmas and Happy New Year!

Regadrs,
Otto
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Building Reports -> Crystal Reports  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0482 seconds using 17 queries. (SQL 0.0028 Parse 0.0348 Other 0.0106)
CCBot/2.0 (http://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo