Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys
I made this store procedure to create a crystal report

SQL
ALTER PROCEDURE [dbo].[Stat]  
@city nvarchar(50),
@company nvarchar(50),
@lastname nvarchar(50)
AS SELECT DISTINCT s.Lastname, s.Firstname, s.Fathername + ' ' + s.Lastname AS Fname, s.Birthday, s.City, s.Phone, s.Cellphone, s.Company, s.Mothername + ' ' + s.Mlname AS Mname, s.ID, s.Cbirth , i.TK , i.Name FROM Staff s INNER JOIN dbo.Settings i on s.StaffID=i.ID 
WHERE (((s.City)=@city) AND ((s.Company)=@company)) AND ((s.Lastname)=@lastname) 
Return


The problem is that the report does not show any data.

Can anyone help please!

Thanks in advance
Posted
Comments
gvprabu 30-Oct-13 10:34am    
Hi.... are you checked the given Input values.? Here only 2 problems one is given Input second is "Settings" table didn't have value.
jomachi 30-Oct-13 10:37am    
The store procedure is right?
ZurdoDev 30-Oct-13 11:56am    
What happens when you run the SQL manually? We can't debug it for you because we don't have access to your db.
Corporal Agarn 30-Oct-13 15:24pm    
If any variable is null the whole thing is null. Lookup ISNULL
jomachi 30-Oct-13 16:58pm    
Thank you guys for the responce. Αctually the variable is NULL.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900