Looking for some assistance with a detail filter expression, that is not working and returning the correct results. I've commented out various sections which appear to work, but when I uncomment the entire expression, something is wrong and it's giving me back odd results.
Here's the matrix that I'm working off of...
Runsheet Type FRM_PNT_TYP_ENU TO_PNT_TYP_ENU
Allocated 3 4
Shuttle 3 3 FRM_STA_CD = TO_STA_CD
Linehaul 3 3 FRM_STA_CD <> TO_STA_CD
Allocated & Shuttle 3 3 or 4 FRM_STA_CD = TO_STA_CD
Allocated & Linehaul 3 3 or 4 FRM_STA_CD <> TO_STA_CD
Shuttle & Linehaul 3 3
and here's the expression...
(?pRunSheetType? = 'Allocated' AND [FRM_PNT_TYP_ENU] = 3 AND [TO_PNT_TYP_ENU] = 4)
OR (?pRunSheetType? = 'Shuttle' AND [FRM_PNT_TYP_ENU] = 3 AND [TO_PNT_TYP_ENU] = 3 AND [FRM_STA_CD] = [TO_STA_CD])
OR (?pRunSheetType? = 'Linehaul' AND [FRM_PNT_TYP_ENU] = 3 AND [TO_PNT_TYP_ENU] = 3 AND [FRM_STA_CD] <> [TO_STA_CD])
OR (?pRunSheetType? = 'Allocated & Shuttle' AND [FRM_PNT_TYP_ENU] = 3 AND ([TO_PNT_TYP_ENU] = 3 OR [TO_PNT_TYP_ENU] = 4) AND [FRM_STA_CD] = [TO_STA_CD])
OR (?pRunSheetType? = 'Allocated & Linehaul' AND [FRM_PNT_TYP_ENU] = 3 AND ([TO_PNT_TYP_ENU] = 3 OR [TO_PNT_TYP_ENU] = 4) AND [FRM_STA_CD] <> [TO_STA_CD])
OR (?pRunSheetType? = 'Shuttle & Linehaul' AND [FRM_PNT_TYP_ENU] = 3 AND [TO_PNT_TYP_ENU] = 3)
OR (?pRunSheetType? = 'All' AND [FRM_PNT_TYP_ENU] = 3 AND ([TO_PNT_TYP_ENU] = 3 OR [TO_PNT_TYP_ENU] = 4) AND ([FRM_STA_CD] <> [TO_STA_CD]) OR [FRM_STA_CD] = [TO_STA_CD])