Hi Friends,
I have a problem with retrieving data from Crystal Reports. I have three parameters to get the records from OINV and INV1.
The frist two is 'from date' and 'to date' for the DocDate. The third one is for getting Sales Employee and has to be selected based on 'like' condition. I am able to fetch the records based on dates; but not when i select sales employee.
Following is the query from the Crystal Report, which is working perfectly fine when i run it on the SQL server.
SELECT "OINV"."DocDate", "OINV"."DocNum", "OINV"."CardCode", "OINV"."CardName", "INV1"."ItemCode", "INV1"."Dscription", "INV1"."Quantity", "INV1"."PriceBefDi", "INV1"."DiscPrcnt", "OSLP"."SlpName", "OINV"."U_Commission"
FROM ("JELLYCAT_LIMITED (Training)"."dbo"."OINV" "OINV" INNER JOIN "JELLYCAT_LIMITED (Training)"."dbo"."OSLP" "OSLP" ON "OINV"."SlpCode"="OSLP"."SlpCode") INNER JOIN "JELLYCAT_LIMITED (Training)"."dbo"."INV1" "INV1" ON ("OINV"."OwnerCode"="INV1"."OwnerCode") AND ("OINV"."DocEntry"="INV1"."DocEntry")
WHERE "OSLP"."SlpName" LIKE N'%JC%' AND ("OINV"."DocDate">={ts '2009-01-01 00:00:00'} AND "OINV"."DocDate"<{ts '2010-01-01 00:00:00'})
ORDER BY "OSLP"."SlpName"
The formula syntax i gave for sales employee was - {OSLP.SlpName} like "%" + LTRIM({?SalesEmployee}) + "%"
Any help would be great.
Thanks & Regards
Shiva