Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem to calculate formula Post Reply Post New Topic
Page  of 3 Next >>
Author Message
fsilvabrasil
Groupie
Groupie
Avatar

Joined: 08 Jul 2013
Location: Brazil
Online Status: Offline
Posts: 42
Quote fsilvabrasil Replybullet Topic: Problem to calculate formula
    Posted: 03 Sep 2013 at 2:09am
Hello

Good day.

I'm having problems with formulas in crystal'm new to the program, I have to create a formula that has to sum ​​the values​​.

I created a formula to sum​​.
1
1
3
1
1
1
2
3
1
2

total = 16

more is not the correct value for the report is that the sum certain.

1
1
3
1
1
1
2
3
1
2

total = 10
it not only sums the values ​​that two or more.

version of Crystal Reports XI
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 03 Sep 2013 at 2:32am

Hi,

What is the formula you are using for sum?
What is your exact requirement?
Do you want to show total as 10 or 16??
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
fsilvabrasil
Groupie
Groupie
Avatar

Joined: 08 Jul 2013
Location: Brazil
Online Status: Offline
Posts: 42
Quote fsilvabrasil Replybullet Posted: 03 Sep 2013 at 3:01am
Hi the formula I'm using is this?

numberVar i: = 0;

if (AGR_FALTA_ATESTADOS_V.FALTAS {})> 0
   then i: = i +1


when do sum of formula field it shows the value that I want is 10, not 16.
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 03 Sep 2013 at 3:16am

Hi,

Using above formula, it will count the number of  {AGR_FALTA_ATESTADOS_V.FALTAS} in the report/section.
In which section have you placed the above formula?
Do you need sum of the formula output or Count of the formula output?
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
fsilvabrasil
Groupie
Groupie
Avatar

Joined: 08 Jul 2013
Location: Brazil
Online Status: Offline
Posts: 42
Quote fsilvabrasil Replybullet Posted: 03 Sep 2013 at 3:51am
Yes, I use it in the Group Footer section # 3

how do the sum of production formula and how do I count the output.
IP IP Logged
fsilvabrasil
Groupie
Groupie
Avatar

Joined: 08 Jul 2013
Location: Brazil
Online Status: Offline
Posts: 42
Quote fsilvabrasil Replybullet Posted: 03 Sep 2013 at 3:57am
Yes, I use it in the Group Footer section # 3

how do the sum of production formula and how do I count the output.
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 04 Sep 2013 at 3:31am
Hi,
 
Right click on the formula which is placed on Group Footer Section # 3.
Select Insert option then Insert Summary window will pops-up.
In Calculate this Summary drop-down box select Count and Summary Location as  Report Footer/Page Footer
Then Click on OK
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
fsilvabrasil
Groupie
Groupie
Avatar

Joined: 08 Jul 2013
Location: Brazil
Online Status: Offline
Posts: 42
Quote fsilvabrasil Replybullet Posted: 05 Sep 2013 at 2:16am
good day
Friend did not give the correct result did more failed to calculate the value in the operation shows the value of 3.374.
IP IP Logged
fsilvabrasil
Groupie
Groupie
Avatar

Joined: 08 Jul 2013
Location: Brazil
Online Status: Offline
Posts: 42
Quote fsilvabrasil Replybullet Posted: 10 Sep 2013 at 7:00am
Hello

Dear friends.

have someone else to help with this doubt.

Grateful to all who help.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 10 Sep 2013 at 7:50am
I am reading over this thread and wondering how you got a decimal (3.373) when doing count?!?  Counts are always integer.
IP IP Logged
Page  of 3 Next >>
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.047 seconds.