Click here to Skip to main content
15,883,819 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to pass or execute a SQL Function in Crystal Report in C#.

Please Suggest me.
Posted
Comments
ZurdoDev 17-Oct-14 7:57am    
Where are you stuck?
Akaash Kumar 18-Oct-14 2:14am    
I solved this.Thanks for the replying.....

1 solution

I used a stored function like this (i dont know if CR gives a better way):
Create a new SQL Expression Field (for example, named fldUserName)with this text:

dbo.getUserName(users.UserCode,GETDATE())

(an example, getUserName is a function that returns a user name given an user code and today's date)
Then, add the fldUserName field to the report. If you want to understand better, create the SQL expression field and view the SQL Query
 
Share this answer
 

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