Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Problem with sum when group-subgroup-subsubgroup Post Reply Post New Topic
Author Message
meenupatel
Newbie
Newbie


Joined: 10 Jul 2009
Location: India
Online Status: Offline
Posts: 1
Quote meenupatel Replybullet Topic: Problem with sum when group-subgroup-subsubgroup
    Posted: 10 Jul 2009 at 3:34am
Please help me in this situation,
 
i am trying to design the report for 3 main tables. Voucher - item - material .
 
the report will have three level of groups. 1.Voucher - 2. item - 3. material
 

Voucher no:

ReferenceNo:

VoucherDate:

Client Name:

Itemno

Name

Qty

Wt

AB001

Ant lab

100

125.102

MtrCode

MtrName

Qty

Wt

Rate

M001

MtrName1

10

10.10

100

M002

MtrName2

20

20.10

200

Total

 

30

30.20

300

AB002

Black lab

150

125.000

MtrCode

MtrName

Qty

Wt

Rate

M002

MtrName2

30

20.10

200

M004

MtrName2

20

20.30

200

Total

 

50

40.40

400

Item Total:

 

250

250.102

 
i am not getting the sum of item (250) here, properly. it gets duplicated the no of times the material records are there.
 
please give me solution to it.
I am tryig to avoid sub report. let me if i can do it better way then using sub report.
 
meena
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 10 Jul 2009 at 1:24pm

How are generating the sum amount? Are you using a formula, running total, etc. and what does it look like?

IP IP Logged
gurupran
Newbie
Newbie
Avatar

Joined: 25 Jun 2009
Location: India
Online Status: Offline
Posts: 6
Quote gurupran Replybullet Posted: 12 Jul 2009 at 11:36pm
Hi
 
  Some times getting problem when sum the group fields. noproblem we are solve it easyly.
 First think you use the Qty field is formula or column_filed?
 
  Want to know that direct column means u use summarise group
or use the following formula
 
 item grp header formula
------------
shared numbervar shtotal;
local numbervar liTotal;
shTotal:=(shTotal+{Command.Qty_value});
liTotal:=shTotal;
shTotal=0;
 
 
drag the formula and paste it header and suppress. this formula get simmarise the every one of the group.
 
then use another formula for footer for summarise
 
shared numbervar shtotal;
shtotal;
 
You get the sum total clearly.
 
Regards
 
 
 
 


Edited by gurupran - 12 Jul 2009 at 11:38pm
guru
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 13 Jul 2009 at 11:42am

 I am having a bit of difficulty with the language issue. My apologies. Have you solved your problem?

Regards,
 
John W.
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 13 Jul 2009 at 11:56am
If you have not resolved the problem I would suggest creating a RunningTotal put it in the group 1 footer, evaluate it on the change of field qty_value and reset on each change of group 1.
 
If that does not work you can always create manual formulas such as you were working on. You can find this described in detail under Crystal Reports Help -> Running Totals -> Using Formulas. You will see you need to put in pieces of the formula in three places. The header, the detail section and the footer.
 
Hope one of these options help
 
Regards,
 
John W.
 
 
 
 
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.016 seconds.