FunkyBunch
Instructor
I am using CR9(SQL 2005) and am having trouble making the inspections with null dates appear. Here is my selection code this far:
IF ({@UnitIsBlank} and {@DivisionIsBlank}) and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd} or isnull({Command.NEXT_INSP_DATE_FW})
or {@Due Date} = cdate(null))THEN True
//****End of statement
//All of these are just every possible combination of valid parameter entries, with the
//result being the record selection that will be applied for that scenario.
Else
IF Not {@UnitIsBlank} and {@DivisionIsBlank} and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd}) or isnull({Command.NEXT_INSP_DATE_FW}) then
{Command.UNIT_FW} = {?ReportVehicle}
else
IF {@UnitIsBlank} and Not {@DivisionIsBlank} and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd}) or isnull({Command.NEXT_INSP_DATE_FW})then
{Command.depot_name_Fw} = {?ReportCostCentre}
else
IF not {@UnitIsBlank} and not {@DivisionIsBlank} and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd}) or isnull({Command.NEXT_INSP_DATE_FW}) then
{Command.depot_name_Fw} = {?ReportCostCentre} and
{Command.UNIT_FW} = {?ReportVehicle}
I know that I am only checking for null in the first field but that is just to for testing purposes. the code for the "isblank" fields is <variable> = "".
IF ({@UnitIsBlank} and {@DivisionIsBlank}) and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd} or isnull({Command.NEXT_INSP_DATE_FW})
or {@Due Date} = cdate(null))THEN True
//****End of statement
//All of these are just every possible combination of valid parameter entries, with the
//result being the record selection that will be applied for that scenario.
Else
IF Not {@UnitIsBlank} and {@DivisionIsBlank} and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd}) or isnull({Command.NEXT_INSP_DATE_FW}) then
{Command.UNIT_FW} = {?ReportVehicle}
else
IF {@UnitIsBlank} and Not {@DivisionIsBlank} and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd}) or isnull({Command.NEXT_INSP_DATE_FW})then
{Command.depot_name_Fw} = {?ReportCostCentre}
else
IF not {@UnitIsBlank} and not {@DivisionIsBlank} and ({Command.NEXT_INSP_DATE_FW} <= {?ReportPeriodEnd}) or isnull({Command.NEXT_INSP_DATE_FW}) then
{Command.depot_name_Fw} = {?ReportCostCentre} and
{Command.UNIT_FW} = {?ReportVehicle}
I know that I am only checking for null in the first field but that is just to for testing purposes. the code for the "isblank" fields is <variable> = "".