Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Percentage Post Reply Post New Topic
Author Message
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Topic: Percentage
     Posted: 14 Mar 2012 at 5:44am
Hi all,

I've created a report showing the different collections per client. These collections are then devided into 2 colloms, Paid to us, and paid directly towards the client. Now I would like to give a percentage of the amount paid to us, and the amount paid to the client.

I want it to look like this:

Client      Collections   To us   %us   % To client    %client
Client A   100E           75E       75%        25E            25%
Client B   200E           75E       37,5%    125E        62.5%

Total      300E          150E          50%     150E        50%

Can anybody help me with this?

Thanks in advance

Gerben
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Mar 2012 at 8:50am
create a formula for each of the calculations:
{table.tous}/{table.collections}
 
and
{table.toclient}/{table.collections}
 
drag the formulas to the report and set the display.
 
HTH
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 15 Mar 2012 at 11:41pm
I thought exactly the same, however, I'm getting or 1, of 0. Does is matter that the collections are a sum? I grouped the clients, and placed a sum over the collections...
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 16 Mar 2012 at 1:53am
Crystal percentages don't work like Excel percentages, ie a value of 0.9 equates to 90% in Excel, however it equates to 0.9% in Crystal.
 
({table.toclient}/{table.collections}) * 100
 
Will fix your percentages.
 
Regards,
Ryan.
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 20 Mar 2012 at 12:10am
I'm still getting 0 or 100 out of it. It looks like it is only looking at the first payment of the group, instead of the combined paymenst.
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 20 Mar 2012 at 12:20am
Originally posted by Gurbs

I'm still getting 0 or 100 out of it. It looks like it is only looking at the first payment of the group, instead of the combined paymenst.
 
Try this;
 
(sum({table.toclient},{table.client})/sum({table.collections},{table.client}))*100
 
That should give you your client percentages, you'll have to make a separate formula for your total;
 
(sum({table.toclient})/sum({table.collections}))*100
 
Regards,
Ryan.
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 20 Mar 2012 at 12:37am
Works perfect, thanks!
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum