Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: If and then, else statments Post Reply Post New Topic
Author Message
ronsandler
Newbie
Newbie
Avatar

Joined: 12 Dec 2007
Location: United States
Online Status: Offline
Posts: 8
Quote ronsandler Replybullet Topic: If and then, else statments
    Posted: 20 Dec 2007 at 7:19am
Can anyone instruct me as to develop a if, then, else statement for a facility that I inspect that would give the following, If {View_tblInspections.InspectionDate}= Month({View_tblInspections.InspectionDate}) in 10 to 12 and year ({View_tblInspections.InspectionDate}) = 2007 then insert that date {View_tblInspections.InspectionDate} else insert nodate
I need the order for the statement to work. any ideas?? Ron
Ron
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 20 Dec 2007 at 11:35am
Off the top of my head (you need to test/tweak it...)
if (Month({View_tblInspections.InspectionDate}) IN 10 TO 12) AND (Year{View_tblInspections.InspectionDate})  = 2007 Then
    CStr({View_tblInspections.InspectionDate})
Else
    ""


If you want to learn more about writing formulas and programming with Crystal syntax, I have three chapters dedicated to it in my book Crystal Reports Encyclopedia

Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
ronsandler
Newbie
Newbie
Avatar

Joined: 12 Dec 2007
Location: United States
Online Status: Offline
Posts: 8
Quote ronsandler Replybullet Posted: 20 Dec 2007 at 1:29pm
THanks,
Ron
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.000 seconds.