dear All
i m using Crystal report 8.5 in .net C#. i have a problum in pasing Null formula field in the where clause...
my Crystal Qurey is:
SELECT
Vehicle_Information."Reg_No",
Colour_Information."Colour_Name",
Customer_Information."Cust_FirstName", Customer_Information."Cust_MidName", Customer_Information."Cust_LastName", Customer_Information."Cust_Off_Name", Customer_Information."Is_Cooperate",
Make_Information."Make_Desc",
Model_Information."Model_Name",
Registration."Install_Date", Registration."Reg_Date", Registration."Transfer_from",
Vehicle_Category."Cat_Descr",
Bas_Equipment."Descr",
Location."Location_Name"
FROM
TBL_Tech_Activity INNER JOIN Trakker.dbo.tbl_GatePass ON TBL_Tech_Activity.Activity_ID = tbl_GatePass.Activity_ID RIGHT OUTER JOIN Trakker.dbo.Vehicle_Information Vehicle_Information INNER JOIN Trakker.dbo.Customer_Information Customer_Information ON Vehicle_Information.Cust_ID = Customer_Information.Cust_ID INNER JOIN Trakker.dbo.Make_Information Make_Information ON Vehicle_Information.Make_ID = Make_Information.Make_ID INNER JOIN Trakker.dbo.Colour_Information Colour_Information ON Vehicle_Information.Colour_ID = Colour_Information.Colour_ID INNER JOIN Trakker.dbo.Registration Registration ON Vehicle_Information.Reg_No = Registration.Reg_No LEFT OUTER JOIN trakker.dbo.Vehicle_Category Vehicle_Category ON Vehicle_Information.Veh_Category = Vehicle_Category.Cat_Id LEFT OUTER JOIN Trakker.dbo.Model_Information Model_Information ON Vehicle_Information.Model_ID = Model_Information.Model_ID INNER JOIN Trakker.dbo.Location Location ON Registration.Install_Location = Location.Location_ID ON Trakker.dbo.tbl_GatePass.Reg_No = Registration.Reg_No LEFT OUTER JOIN trakker.dbo.Bas_Equipment Bas_Equipment ON Registration.Product_install = Bas_Equipment.Equip_ID
WHERE
Registration."Reg_Date" >= {ts '2007-02-01 00:00:00.00'} AND Registration."Reg_Date" < {ts '2007-02-07 00:00:00.00'} AND Vehicle_Information."Status" = 'A' AND (tbl_GatePass. "Is_Cancel" = 'N') OR (tbl_GatePass. "Is_Cancel" IS Null)
ORDER BY
Location.Location_Name ASC, Bas_Equipment.Descr ASC, Vehicle_Category.Cat_Descr ASC
this query working fine in crystal report (preview) with "(tbl_GatePass. "Is_Cancel" IS Null)" clause
but when i use the folowing:
selFormula = "{Registration.Reg_Date} >= date(" + txtFromDate.Text.Substring(6) + "," + txtFromDate.Text.Substring(3,2) + "," + txtFromDate.Text.Substring(0,2) + ") AND {Registration.Reg_Date} <= date(" + txtToDate.Text.Substring(6) + "," + txtToDate.Text.Substring(3,2) + "," + txtToDate.Text.Substring(0,2) + ") AND {Vehicle_Information.Status} = 'A' AND {tbl_GatePass.Is_Cancel} = 'N' OR {tbl_GatePass.Is_Cancel} IS NULL "
in c# .net they gives an error
How can i pass IS NUll in where clause in Crystal report
a waiting for replay
by: mlmccPosted on 2007-02-07 at 05:42:54ID: 18484671
Does the formula work without the IS NULL part?
ncel})
How are you passing this to Crystal?
YOu might try using IsNull({tbl_GatePass.Is_Ca
mlmcc