如何在C#中传递Crystal函数中的SQL函数 [英] How to pass a SQL Function in Crystal Report in C#

查看:53
本文介绍了如何在C#中传递Crystal函数中的SQL函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在C#中传递或执行Crystal Report中的SQL函数。



请建议我。

How to pass or execute a SQL Function in Crystal Report in C#.

Please Suggest me.

推荐答案

我使用了这样的存储函数(我不知道CR是否提供了更好的方法):

使用以下文本创建一个新的SQL表达式字段(例如,名为fldUserName):



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



(例如,getUserName是一个函数返回给定用户代码和今天日期的用户名。

然后,将fldUserName字段添加到报表中。如果您想更好地理解,请创建SQL表达式字段并查看SQL查询
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


这篇关于如何在C#中传递Crystal函数中的SQL函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆