declare @Status nchar(40) ,
@crd nchar(40) ,
@cust int ,
@fromdate datetime,
@todate datetime ;
set @Status ={?@Status};
set @crd={?@crcl}; set @cust={?@cust};
set @fromdate={?@fromdate};
set @todate ={?@todate};
select Custom_Captions.Capt_Family,Media.medi_number,Custom_Captions_1.Capt_Family,Media.medi_scndno,Media.Medi_Name,Custom_Captions_3.Capt_Family,Media.medi_status,Custom_Captions_2.Capt_Family,Custom_Captions_2.Capt_US,Media.medi_crcltype,Media.medi_customer,Company.Comp_Name,Media.medi_daterec From crm.dbo.Media Media inner join crm.dbo.custom_captions Custom_Captions on Media.medi_crcltype=Custom_captions.Capt_Code inner join crm.dbo.custom_captions Custom_Captions_1 on Media.medi_advrcat=Custom_Captions_1.Capt_Code inner join crm.dbo.custom_captions Custom_Captions_3 on Media.medi_status=Custom_captions_3.capt_code left outer join crm.dbo.custom_captions Custom_captions_2 on Media.medi_crcltype=Custom_Captions_2.Capt_Code left outer join crm.dbo.Company Company on Media.medi_customer=Company.comp_CompanyID Where (Custom_Captions_1.Capt_Family is null or Custom_Captions_1.Capt_Family=N'medi_advrcat') and (Custom_captions_3.Capt_family is null or custom_captions_3.Capt_Family=N'medi_status') and Custom_captions.Capt_family=N'crcl_type' and (custom_captions_2.capt_family is null or Custom_Captions_2.Capt_family=N'crcl_type') and Media.medi_status=@Status and Media.medi_crcltype=@crd and Media.medi_customer=@cust and Media.medi_daterec >=@fromdate and Media.medi_daterec <=@todate
Member
55 Points
435 Posts
how to declare parameter sql command with parameter crystal report in sqlc command crystal report...
Feb 24, 2014 08:15 AM|Mohammed Saleh|LINK
I try it but does not give me data
please help me
Thank' for you guids
Member
55 Points
435 Posts
Re: how to declare parameter sql command with parameter crystal report in sqlc command crystal re...
Feb 25, 2014 10:24 AM|Mohammed Saleh|LINK
it is correct code but i resolve prblem in my select expert , I resloved it