Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: This fields cannot be summarized Post Reply Post New Topic
Author Message
koncuk
Newbie
Newbie


Joined: 03 Sep 2009
Online Status: Offline
Posts: 17
Quote koncuk Replybullet Topic: This fields cannot be summarized
    Posted: 11 May 2010 at 10:53pm
i write this formula:

whileprintingrecords;
global numbervar V34XS;
V34XS := Sum ({@34XS2Bakiye}, {SSiparisDMatrix.Nitelik1})

this fields convert to number :

ToNumber({@V34XS})

then i want to sum :

sum({@number34XS})

but i get the following error :

This fields cannot be summarized

How do i?

Thanks,
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 May 2010 at 3:33am

I use formula with shared variables to accomplish this.

1) set the varaible to zero, usually in a group header:
shared numbervar aTotal:=0;
""//hides the assignment
 
2) increment the value, usually in detail section:
shared numbervar aTotal := aTotal + Sum ({@34XS2Bakiye}, {SSiparisDMatrix.Nitelik1});
global numbervar V34XS;
V34XS := Sum ({@34XS2Bakiye}, {SSiparisDMatrix.Nitelik1})
3) display final value; usuall a group footer:
shared numbervar aTotal
 
you can substitute global for 'shared' in a report without subreports, they are functionally the same.
 
HTH
IP IP Logged
koncuk
Newbie
Newbie


Joined: 03 Sep 2009
Online Status: Offline
Posts: 17
Quote koncuk Replybullet Posted: 13 May 2010 at 2:27am
Thanks, i use your formula, it was sum fields, But it is not independent from the database. it sum database records. but I want to make  records collection in group footer. for example number of group footer 13 , 0 ,0 ,1. I want to just this number collect on report footer. But this formula makes 28 as result.

Thanks,
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 13 May 2010 at 3:20am
if you want a total in the report footer, just don't reset it to 0...
 
All of the formulas and anything that you do in CR is going to depend on the database, that is where the data is coming from.
 
HTH
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.