Hi:
I'm using Crystal Reports X with Visual Studio 2005 and am programming in C# (which is new for me, I'm used to VB).
I have the following formula and would like to put "end if" where I've put the comments (see below). My problem is that it's not liking the syntax. Any ideas??
if {IndDecCert.CRED_TYPE_ID} = 7 then
if {IndDecCert.SPECIALTY} = 200 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
else if {IndDecCert.SPECIALTY} = 201 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else if {IndDecCert.SPECIALTY} = 202 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-2"
else if {IndDecCert.SPECIALTY} = 203 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-3"
else if {IndDecCert.SPECIALTY} = 204 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-4"
else if {IndDecCert.SPECIALTY} = 205 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-5"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else if {IndDecCert.CRED_TYPE_ID} = 35 then
if {IndDecCert.SPECIALTY} = 300 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else if {IndDecCert.SPECIALTY} = 600 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-2"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else if {IndDecCert.CRED_TYPE_ID} = 36 or
{IndDecCert.CRED_TYPE_ID} = 37 or {IndDecCert.CRED_TYPE_ID} = 38 then
if {IndDecCert.SPECIALTY} = 650 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else if {IndDecCert.CRED_TYPE_ID} = 16 then
if {IndDecCert.SPECIALTY} = 400 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else cstr({IndDecCert.CRED_TYPE_ID},"000")
Thanks much!
I'm using Crystal Reports X with Visual Studio 2005 and am programming in C# (which is new for me, I'm used to VB).
I have the following formula and would like to put "end if" where I've put the comments (see below). My problem is that it's not liking the syntax. Any ideas??
if {IndDecCert.CRED_TYPE_ID} = 7 then
if {IndDecCert.SPECIALTY} = 200 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
else if {IndDecCert.SPECIALTY} = 201 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else if {IndDecCert.SPECIALTY} = 202 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-2"
else if {IndDecCert.SPECIALTY} = 203 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-3"
else if {IndDecCert.SPECIALTY} = 204 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-4"
else if {IndDecCert.SPECIALTY} = 205 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-5"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else if {IndDecCert.CRED_TYPE_ID} = 35 then
if {IndDecCert.SPECIALTY} = 300 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else if {IndDecCert.SPECIALTY} = 600 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-2"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else if {IndDecCert.CRED_TYPE_ID} = 36 or
{IndDecCert.CRED_TYPE_ID} = 37 or {IndDecCert.CRED_TYPE_ID} = 38 then
if {IndDecCert.SPECIALTY} = 650 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else if {IndDecCert.CRED_TYPE_ID} = 16 then
if {IndDecCert.SPECIALTY} = 400 then
cstr({IndDecCert.CRED_TYPE_ID},"000") + "-1"
else cstr({IndDecCert.CRED_TYPE_ID},"000") + "-0"
// I want to insert an end if here
else cstr({IndDecCert.CRED_TYPE_ID},"000")
Thanks much!