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_N
o",
Colour_Information."Colour
_Name",
Customer_Information."Cust
_FirstName
", Customer_Information."Cust
_MidName",
Customer_Information."Cust
_LastName"
, Customer_Information."Cust
_Off_Name"
, Customer_Information."Is_C
ooperate",
Make_Information."Make_Des
c",
Model_Information."Model_N
ame",
Registration."Install_Date
", Registration."Reg_Date", Registration."Transfer_fro
m",
Vehicle_Category."Cat_Desc
r",
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_Inform
ation Vehicle_Information INNER JOIN Trakker.dbo.Customer_Infor
mation Customer_Information ON Vehicle_Information.Cust_I
D = Customer_Information.Cust_
ID INNER JOIN Trakker.dbo.Make_Informati
on Make_Information ON Vehicle_Information.Make_I
D = Make_Information.Make_ID INNER JOIN Trakker.dbo.Colour_Informa
tion 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_Catego
ry Vehicle_Category ON Vehicle_Information.Veh_Ca
tegory = Vehicle_Category.Cat_Id LEFT OUTER JOIN Trakker.dbo.Model_Informat
ion Model_Information ON Vehicle_Information.Model_
ID = Model_Information.Model_ID
INNER JOIN Trakker.dbo.Location Location ON Registration.Install_Locat
ion = Location.Location_ID ON Trakker.dbo.tbl_GatePass.R
eg_No = Registration.Reg_No LEFT OUTER JOIN trakker.dbo.Bas_Equipment Bas_Equipment ON Registration.Product_insta
ll = 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."Statu
s" = '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.Statu
s} = '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