Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula doesn't work (error) Post Reply Post New Topic
Author Message
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Topic: Formula doesn't work (error)
     Posted: 31 Oct 2011 at 12:19am

Dear reader,

 

I’ve made some formula’s, see below.

Only the last one doesn’t work.

I don’t know why.

 

Does anybody know?

Thank you very much!

 

  

Formula: Functiebeoordeling

 

if {COM_FUNCTION.ID}=391 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.EVB-A}else

if {COM_FUNCTION.ID}=391 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.EVB-A}else

if {COM_FUNCTION.ID}=395 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.EVB-B}else

if {COM_FUNCTION.ID}=394 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.EVAB-A}else

if {COM_FUNCTION.ID}=392 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.EVAB-B}else

if {COM_FUNCTION.ID}=424 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.EVAB Agrar}else

if {COM_FUNCTION.ID}=389 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.AWW}else

if {COM_FUNCTION.ID}=261 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.Begeleider }else

if {COM_FUNCTION.ID}=390 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.Begeleider A}else

if {COM_FUNCTION.ID}=388 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.Begeleider B}else

if {COM_FUNCTION.ID}=393 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.Akt Beg A}else

if {COM_FUNCTION.ID}=406 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.Akt Beg B}else

if {COM_FUNCTION.ID}=397 then {AbronaBeroepsOpleidngenEnFunctiesWonenEnDb.Akt Beg Agrar}else

"Onbekend!"

 

 

Formula: Functiebeoordeling2

 

If ({@FunctieBeoordeling}="v" or {@FunctieBeoordeling}="V") then 1 else 0

 

 

Formula: Functiebeoordeling3

 

Sum({@FunctieBeoordeling2},{REL_PERSOON.K5CALC})

 

 

 

Formula: Functiebeoordeling4

 

if ({@FunctieBeoordeling3})>0 then "J" else "N"

 

 

 

Formula: Functiebeoordeling5

 

if ({@FunctieBeoordeling3})>0 then 1 else 0

 

 

 

Formula: Functiebeoordeling6

 

(sum({@FunctieBeoordeling5},{REL_UNIT.NAAM}))

 

Error:

“U kunt geen samenvatting van dit veld maken” 

in English: “You can’t make a summary from this field”



Edited by gnaus - 31 Oct 2011 at 1:19am
GN
IP IP Logged
venky_115
Groupie
Groupie
Avatar

Joined: 15 Jun 2010
Location: United States
Online Status: Offline
Posts: 67
Quote venky_115 Replybullet Posted: 31 Oct 2011 at 1:56am
You should have a mapped group to make a summary,
Regards
IP IP Logged
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Posted: 31 Oct 2011 at 2:26am
Thanks, but I already have a group on REL_UNIT.NAAM.
A group on @FunctieBeoordeling5 is not possible...
GN
IP IP Logged
Robotacha
Groupie
Groupie
Avatar

Joined: 11 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 97
Quote Robotacha Replybullet Posted: 31 Oct 2011 at 3:05am
I guess its because theoretically, you are trying to SUM an already SUMMED field / formula.
 
formula 3 is a SUM.
 
formula 5 is a BOOLEAN result of formula 3.
 
formula 6 is trying to sum formula 5.
 
 
Try using a count function on FORMULA 5 instead.
Regards,

Michael Jones
IP IP Logged
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Posted: 31 Oct 2011 at 4:30am
I already tried this, same result..
GN
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 01 Nov 2011 at 8:50am
Have you tried.

Formula: Functiebeoordeling6

 

sum({@FunctieBeoordeling5})

IP IP Logged
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Posted: 01 Nov 2011 at 8:50pm
sorry, same result.... :(
GN
IP IP Logged
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Posted: 02 Nov 2011 at 10:43pm
in 2008 on this forum there was somebody with the same problem. here below the answer.
But I can't translate this properly to my case.. maybe anyone else can?
thank you!
 
YOu can do a Running Total as a distinct count of ID# set to count conditionally. In the evaluate for portion of the RT use your formula for the 1/0. Just swap it to only meet the "1" condition (no if-then process).
YOu can have a RT per group if needed (reset at group1) and once for the entire report (never rset). Set the same way other than the reset option.
YOur RT (s) can be placed in the Group footer per group and the report footer for the entire count.
GN
IP IP Logged
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Posted: 02 Nov 2011 at 11:36pm
an other solution is this: but also this I can't properly translat to my situation :(
 
 
You need to use a variable, create 3 formula

@reset
whileprintingrecords;

global numbervar GTotal:=0;
//place this in report header, or higher grou header as appropriate

@Eval

whileprintingrecords;

global numbervar GTotal:=GTotal + Sum( valuefield, groupfield);
// place this in group footer where your sum shows

@display
whileprintingrecords;

global numbervar GTotal;
//Place this in report or higher group footer


Edited by gnaus - 02 Nov 2011 at 11:39pm
GN
IP IP Logged
gnaus
Newbie
Newbie
Avatar

Joined: 13 Sep 2011
Location: Netherlands
Online Status: Offline
Posts: 14
Quote gnaus Replybullet Posted: 03 Nov 2011 at 12:43am
I did it.  with de running total field. greetings, GN
 
on field REL_PERSOON.K5CALC, unique count,
evaluation bij formula: ({@FunctieBeoordeling}="v" or {@FunctieBeoordeling}="V")
 
and change at group REL_Unit.NAAM
 
and place this in the group footer
 
thanks all,
GN
GN
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