Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: problem amount of Total in group section Post Reply Post New Topic
Author Message
neubie
Newbie
Newbie


Joined: 01 Nov 2010
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote neubie Replybullet Topic: problem amount of Total in group section
     Posted: 01 Nov 2010 at 7:23pm
Hi there,

I need help regarding my design of report.

I design new report using crystal report X.

here the point,
I have a field to be sum (let say field_A), that field in group section.
the problem is,system (crystal report) will sum (either for grand total or subtotal) with calculation method:
[(Field_A of record no.1) x (number of row in detail section for that record)] + [(Field_A of record no.2) x (number of row in detail section for that record)] + .... + [(Field_A of record no-N) x (number of row in detail section for that record)]

but I need only sum:
(Field_A of record no.1) + (Field_A of record no.2)+...+(Field_A of record no.-n)

need help, how to solve this. thanks before
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 02 Nov 2010 at 2:04am
Are you using XML as a data source?
 
I've had similar problems. I usually end up doing running totals for this but calculating on change of a unique record identifying field. Try setting it up with Field_A as the Field to Summarize, Type of Summary=Sum, Evaluate On Change of field=Field_UniqueRecordIdentifyer, and Reset as needed.
 
I've often had programmers create a new field for this purpose that is just a number field that increments by one for every new record. That way each record will have a unique number with no duplicates and you should get your total as needed.
 
Hope that works for you, or at least gives you an idea for something that will.
|< /\ '][' ( )
IP IP Logged
neubie
Newbie
Newbie


Joined: 01 Nov 2010
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote neubie Replybullet Posted: 03 Nov 2010 at 12:48am
to FrnhtGLI
nope,
I didn't use xml, only use database expert.
can you explain more detail? thanks before
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 03 Nov 2010 at 2:11am
I use XML so my problem may be different than yours, but I believe the solution should be the same. My problem was if the XML has D0, D1, and D2 sections and I'm calculating something from the D0 then the number would be included as many times as there are D1s and D2s. So if the field contained a value of 5 and there are 3 D1 sections, my amount would be 15 where it only needed to be 5.
 
As I stated before, having a unique identifying field for each record is one way of solving this. Just create a Running Total from the Field Explorer on the right and follow the other guidelines I stated previously.
|< /\ '][' ( )
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