I'm using Crystal Report XI to create a simple report with 4 columns using 2 tables and 1 view. The tables are:
Table - District_Master has only 2 fields County_Code & District_Code.
View - VW_V1Master that has the distinct County_Code & District_code selected from another table called V1Master.
Table - DistrictCode_Not_In_V1Master (County_code, District_Code)
I'm using left outer join for joining my District_Master table with the view and the other table.
In the report I've to print:
County_Code, District_Code, In_V1Master(Yes/No), Not_In_V1Master(Yes/No)
For the last 2 columns I wrote 2 different formulas where I'm concatinating the County_code+Dsitrict_Code from the District_Master table and comparing it with the concatenation of County_Code+District_code from the view and the other table and display Yes or No.
The problem is that the IF statement is able to print Yes when the combination exists, but is not able to print No when it does not.
The formula looks like this:
If ({DISTRICT_MASTER.COUNTY_CODE}+{DISTRICT_MASTER.DISTRICT_CODE} in {VW_V1MASTER.COUNTY_CODE}+{VW_V1MASTER.DISTRICT_CODE}) Then
'Yes'
Else 'No'
The 2nd formula is similar to this one but instead of the view I'm using the 2nd table, but there also the Else part to display 'No' is not working.
I've already tried using IIF statement with ISNULL to put a "" for County_Code & District_Code for the view and the other table, in-case the values do not exist, but still the ELSE part is not displaying 'NO'.
Can anyone help to make these formulas work for the Else part.
Thanks in advance!
PS
Table - District_Master has only 2 fields County_Code & District_Code.
View - VW_V1Master that has the distinct County_Code & District_code selected from another table called V1Master.
Table - DistrictCode_Not_In_V1Master (County_code, District_Code)
I'm using left outer join for joining my District_Master table with the view and the other table.
In the report I've to print:
County_Code, District_Code, In_V1Master(Yes/No), Not_In_V1Master(Yes/No)
For the last 2 columns I wrote 2 different formulas where I'm concatinating the County_code+Dsitrict_Code from the District_Master table and comparing it with the concatenation of County_Code+District_code from the view and the other table and display Yes or No.
The problem is that the IF statement is able to print Yes when the combination exists, but is not able to print No when it does not.
The formula looks like this:
If ({DISTRICT_MASTER.COUNTY_CODE}+{DISTRICT_MASTER.DISTRICT_CODE} in {VW_V1MASTER.COUNTY_CODE}+{VW_V1MASTER.DISTRICT_CODE}) Then
'Yes'
Else 'No'
The 2nd formula is similar to this one but instead of the view I'm using the 2nd table, but there also the Else part to display 'No' is not working.
I've already tried using IIF statement with ISNULL to put a "" for County_Code & District_Code for the view and the other table, in-case the values do not exist, but still the ELSE part is not displaying 'NO'.
Can anyone help to make these formulas work for the Else part.
Thanks in advance!
PS