Dear reader,
I’ve made a report and everthing is functioning properly.
But… when I add an other formula on that report, he triggers on a formula he accepted before!
At first he says the formula is oke, but when I refresh, I get the message: “Tekenreeks met onjuiste datumnotatie” (in English something like: String with wrong dateformat).
So he triggers on something he didn’t trigger on before.
I think CR has een problem with “formula on formula”.
The formula I use:
@Examendatum
cdate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum})
(examendatum is a string)
@VerlopenBekwaamheid
(
If {ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Herhalingsinterval}="24" then
dateadd("yyyy",2,cdate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum}))
else
if {ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Herhalingsinterval}="12" then
dateadd("yyyy",1,cdate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum}))
else
if {ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Herhalingsinterval}="6" then
dateadd("M",6,cdate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum}))
)
@Verlopen
if{@VerlopenBekwaamheid}<Currentdate then "J"
So far so good
Alle these formula work properly together in the report
But when I use the next formula: (in the select expert), he triggers and I get the fault I mentioned above.
(I use a parameter -?Verlopen of niet verlopen of beiden?- with string with the options “Verlopen” and “Niet verlopen”)
(
if {?Verlopen of niet verlopen of beiden?}="Verlopen" then ({@Verlopen})="J"
else
if {?Verlopen of niet verlopen of beiden?}="Niet verlopen" then ({@Verlopen})<>"J"
)
So when I place this latest formula I get the message: “String with wrong dateformat”
And he points to the formule above: @VerlopenBekwaamheid at: cdate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum}
I also tried to use this (in formula @VerlopenBekwaamheid) :
If IsDate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum}) Then
CDate({ABR_ACTIEVE_MEDEWERKERS_MET_CURSUSSEN.Examendatum})
But this doesn’t help and I don’t know where to place this , in wich formula on wich place and how (with “and” or “else”?)
I hope someone knows how to make this work
Thank you very much!