Select records using crystal report with null condition
I was trying to filter the data in database with the following formula in my crystal report and one of the condition is to included the data even this, '{vw_CandidateProfile.Typ开发者_如何学编程e}' is null or empty string. But the formula below doesn't work. Any ideas?
{vw_CandidateProfile.Candidate_Code} = '881225095228'
AND (
{vw_CandidateProfile.Type} IN ['NGO','EDU','PRS','PPR','PPS','TTL','OTH']
OR ISNULL({vw_CandidateProfile.Type})
)
I have found the solution in which the IsNull() field has to comes before the field which is no IsNull().
{vw_CandidateProfile.Type} IN ['NGO','EDU','PRS','PPR','PPS','TTL','OTH']
OR ISNULL({vw_CandidateProfile.Type})
becomes
ISNULL({vw_CandidateProfile.Type})
OR {vw_CandidateProfile.Type} IN ['NGO','EDU','PRS','PPR','PPS','TTL','OTH']
Use formula: in Select Expert
ToText({vw_CandidateProfile.Type}) = ""
精彩评论