Can't restrict on a sometimes null field
Crystal Reports 11
MSSQL 2000 DB
Vehicle maintenance database:
Attempting to write a two-table report that will show vehicle numbers (from Table1) and a *subset* of vehicle inspections (from Table2). Not all vehicles in Table1 have inspections listed in Table2, but my report needs to show all vehicles from Table1 along with a subset (if any) of inspections listed in Table2. Example:
Table1:
vehcile_number
3556
3557
Table2:
vehicle_number Inspection
3556 STATE
3556 EMISSONS
3556 SAFETY
I've joined Table1 and Table2 on vehicle_number with:
Join Type: Left Outer Join
Enforce Join: No Enforcement
Link Type: =
Restrictions:
With no restrictions, output looks as expected, below.
vehicle_number Inspection
3556 STATE
3556 EMISSIONS
3556 SAFETY
3557
However, I want to restrict SAFETY inspections from the report. When I restrict thusly: Inspection <> "SAFETY", the SAFETY inspection is restricted from the report (OK), but the vehicles with *no* inspecitons are also restricted from the report as below (NOT OK).
vehicle_number Inspection
3556 STATE
3556 EMISSIONS
It's missing vehicle number 3557 (with NULL value in the Inspection field)
How do I write the restrction so that the SAFETY inspection is excluded while including those vehicles with *no* inspections? Any help is greatly appreciated.
Jeff
Crystal Reports 11
MSSQL 2000 DB
Vehicle maintenance database:
Attempting to write a two-table report that will show vehicle numbers (from Table1) and a *subset* of vehicle inspections (from Table2). Not all vehicles in Table1 have inspections listed in Table2, but my report needs to show all vehicles from Table1 along with a subset (if any) of inspections listed in Table2. Example:
Table1:
vehcile_number
3556
3557
Table2:
vehicle_number Inspection
3556 STATE
3556 EMISSONS
3556 SAFETY
I've joined Table1 and Table2 on vehicle_number with:
Join Type: Left Outer Join
Enforce Join: No Enforcement
Link Type: =
Restrictions:
With no restrictions, output looks as expected, below.
vehicle_number Inspection
3556 STATE
3556 EMISSIONS
3556 SAFETY
3557
However, I want to restrict SAFETY inspections from the report. When I restrict thusly: Inspection <> "SAFETY", the SAFETY inspection is restricted from the report (OK), but the vehicles with *no* inspecitons are also restricted from the report as below (NOT OK).
vehicle_number Inspection
3556 STATE
3556 EMISSIONS
It's missing vehicle number 3557 (with NULL value in the Inspection field)
How do I write the restrction so that the SAFETY inspection is excluded while including those vehicles with *no* inspections? Any help is greatly appreciated.
Jeff