Sacheveral
Technical User
Running CR10 in Win XP. According to the help you can pass conditional record selection to the SQL statement in Crystal by using the Switch command. However I have tried the following and it does not seem to work:
{Employee_Man.Descriptor} = "John Smith" or
switch(isnull({Employee_VT.Descriptor}),false,true,{Employee_VT.Descriptor} = "John Smith")
The reason for wanting to do this is that there is always a {Employee_Man.Descriptor}, but only sometimes a {Employee_VT.Descriptor}. If I do it without the switch statement then if {Employee_VT.Descriptor} is null it skips the record, even if it meets the first part of the criteria.
The switch statement works, but does the filtering locally rather than at the server. Can anyone help, and also provide some examples of how to form SQL friendly switch statements generally?
Many thanks,
Joe
{Employee_Man.Descriptor} = "John Smith" or
switch(isnull({Employee_VT.Descriptor}),false,true,{Employee_VT.Descriptor} = "John Smith")
The reason for wanting to do this is that there is always a {Employee_Man.Descriptor}, but only sometimes a {Employee_VT.Descriptor}. If I do it without the switch statement then if {Employee_VT.Descriptor} is null it skips the record, even if it meets the first part of the criteria.
The switch statement works, but does the filtering locally rather than at the server. Can anyone help, and also provide some examples of how to form SQL friendly switch statements generally?
Many thanks,
Joe