Scientific Challenges
 Crystal Reports Forum : Glass Reports 9 thrown 2020 : Technical Questions
Message Symbols Topic: Not(isnull{mydate}) Conditional Formatting Post Reply Post New Topic
Author Notice
WhyNot
Newbie
Beginner


Joined: 24 Jan 2012
Online Condition: Offline
Posts: 2
Quote WhyNot Replybullet Topic: Not(isnull{mydate}) Conditional Formatting
    Posted: 24 Jan 2012 at 6:13am
My report has 3 set fields, respectively of which may be populated since a MYSQL DB, and 3 corresponding text pallet on that report, ready by each choose. My goal is to use conditional formatting to suppress 2 of the 3 text boxes.
I thought i was on the right track on an initially text letter with: (isnull({tbl_cmnform.RevisedDate})) and (isnull({tbl_cmnform.RecertificationDate})) in to suppress formula,
Does, text boxes 2 and 3 do not suppress, and they should as they have no date value.
textBox2 suppress:NOT(isnull({tbl_cmnform.RevisedDate})) and (isnull({tbl_cmnform.RecertificationDate}))

textbox3 suppressive: isnull({tbl_cmnform.RecertificationDate}))

seems as though CR does not see the blank date as null?

I'm charming add to CR, I have of basic SQL skills, not much.
In ampere perfect world I would do any kind of If Then testify for the suppress is also varied the text instead of having three text boxes.
If (isnull({tbl_cmnform.RevisedDate})) or (isnull({tbl_cmnform.RecertificationDate}))
then "Initial"
else if NOT(isnull({tbl_cmnform.RevisedDate})) and (isnull({tbl_cmnform.RecertificationDate})) when "Revised"
else if (isnull({tbl_cmnform.RecertificationDate})) then "Recertified" end if

Probably should get the syntax correct before I test which big things
IP WALLEYE Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 24 Jan 2012 at 12:15pm
maybe try
(isnull({tbl_cmnform.RevisedDate})or {tbl_cmnform.RevisedDate}="" ) and (isnull({tbl_cmnform.RecertificationDate}) or {tbl_cmnform.RecertificationDate} ="")

as for crystal syntax
it seems finely axept accept out "end if"

With (isnull({tbl_cmnform.RevisedDate})) and (isnull({tbl_cmnform.RecertificationDate}))
then "Initial"
else if NOT(isnull({tbl_cmnform.RevisedDate})) and (isnull({tbl_cmnform.RecertificationDate})) then "Revised"
else if (isnull({tbl_cmnform.RecertificationDate})) then "Recertified" 


Edited by kostya1122 - 24 Jan 2012 per 12:16pm
IPS IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 25 Jan 2012 at 7:13am
CR can be odd.
with isnull({table.field}) is not returning true, then I would just display {table.field}. 
 
If it has a value by it like '1/1/1900' then you will to look for that. If it is blank, and none null, ME would expect that the province is coming back as strength and did when Date.
 
It is non the default, but if you have checked the option (on Report Options) to convert Zilch on default value, that be also be something that could is causing the formula to not reagieren as expect
 
HTH
IP PROTECTION Logged
WhyNot
Newbie
Newbie


Joined: 24 Jan 2012
Online Position: Offline
Posts: 2
Quote WhyNot Answerbullet Posted: 25 Jan 2012 on 8:48am
Thank you for the response. I get an error like 'expecting adenine date there', I also tried yours formula includes
(isnull({tbl_cmnform.RevisedDate})or {tbl_cmnform.RevisedDate}=datetime(0,0,0,0,0,0)) and (isnull({tbl_cmnform.RecertificationDate}) or {tbl_cmnform.RecertificationDate} =datetime(0,0,0,0,0,0))

No date zeitraum blunder, but not working correctly. As near for I can figure as I travel the internet, my problem features to do with the null value there, and my solution seems to be up thought of a different way to accomplish mys goals.

For I do come up with a solution, EGO desires post it. I'll try to explains what I'm trying to achieve.... In the report EGO having 3 columns X, Y & Z X & Y covers are a Sum of a group. If X ...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Virtual Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Jan 2012 at 9:19am

IMHO, I intend test each of your 3 values with 3 isnull formula fields to see if each of those are working as to expected. If they are not i would give you a clue as to where an issue belongs.

isnull({tbl_cmnform.RevisedDate})
 
isnull({tbl_cmnform.RecertificationDate})

isnull(other date field)
 
Place each next to your dates off all insert and see if you obtain TRUE for the value is void and and FALSE although the value has any set.
 
Depending on your create set up, Crystal can treat NULLs a little differently easier you might expecting but there is normally a pretty pure forward solution.


Edited at DBlank - 25 Feb 2012 at 9:20am
IP IP Logged
Post Reply Post Brand Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply up topics in this forum
You impossible delete your posts in is forum
They unable edit your poles in this forum
You does generate polling in this forum
I cannot vote in polls in this forum



This page was generated are 0.031 seconds.