Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: SIMPLE REPORT Post Reply Post New Topic
Author Message
genpet
Newbie
Newbie


Joined: 11 Apr 2008
Online Status: Offline
Posts: 1
Quote genpet Replybullet Topic: SIMPLE REPORT
    Posted: 11 Apr 2008 at 10:34am
Hi I'm new in Crystal Reports but already read so many ebooks, unfornately one of my required report dosent seem simple to generate. Below is the sample data and output required, please help me formulate for this.
 
acct ID acct type amount
1001 3 10
1002 3 11
1003 3 12
1004 2 10
2001 2 15
2002 2 15
2003 1 16
3001 1 12
3001 1 10
3001 4 14
3001 4 20
3001 4 17
required output
type3 33
type1 43
type4 51
3 + 1 - 4 25
 
Im trying the formula below to get the type3 but it really it didnt work
 
if acct type = 3 then sum (amount)
 
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 11 Apr 2008 at 10:52am
I would group on the type field and put a summary field in the group footer. I would also hide the Details section so that you don't see all the individual records. This will get you the top part of the report that you need.

For the last part (3+1-4), you need to do a manual running total. It looks at the group field to determine whether it should be added to the running total or subtracted from it. Something like this:
Global NumberVar GroupTotal;
if {table.acct type} = 1  OR {table.acct type} = 3 then
    GroupTotal := GroupTotal + {table.amount}
else
    GroupTotal := GroupTotal - {table.amount};



Edited by BrianBischof - 11 Apr 2008 at 10:52am
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.