如何在Crystal Reports中的where where条件下编写Sql表达式 [英] How to Write Sql Expression with where condition in Crystal Reports

查看:94
本文介绍了如何在Crystal Reports中的where where条件下编写Sql表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我是Crystal报道的新手。这是我简单的SQL查询。



Hi i am new to Crystal reports. Here is my simple SQL Query.

SELECT        SUM(dbo.emp_acc_credit.pfund)
FROM            dbo.emp_acc_credit
where (emp_acc_credit.EID = @eid)





我想在Crystal报表中编写Sql Expression 。这里'@eid'是每个雇员的身份证,在我的报告中,它显示了所有雇员的详细信息,在一个页面上我们有一个雇员的所有详细记录。



如何分配该EID?



I want to write it in Crystal reports Sql Expression. Here '@eid' is the id of each employ and in my report it is showing detail of all employs one by one means on one page we have all detail record of one employ.

How can i assign that EID?

推荐答案

如果您设计的报告方式需要列出所有员工,那么您不需要需要,其中



但是,如果您传入的是员工ID(例如来自用户输入) )那么你不能使用SQL Expression,你需要使用一个Command。



有一些例子 here [ ^ ]



每页显示一条记录 [ ^ ]



Crystal Report中的页面总数.. [ ^ ]
If you have designed your report in such a way that all employees need to be listed then you don't need the where at all.

However, if you are passing in an employee id (e.g. from user input) then you can't use a SQL Expression, you will need to use a Command.

There are some examples here[^]

show one record per page[^]

Page wise total in Crystal Report..[^]


使用选择公式 [ ^ ] 参数 [ ^ ]



编辑
使用群组,查看此

使用ASP.NET中的多个表创建Crystal报表 [ ^ ]
Use Selection Formula[^] with parameters[^]

EDIT
Use Groups, check this
Creating Crystal Report with Multiple Tables in ASP.NET[^]


这篇关于如何在Crystal Reports中的where where条件下编写Sql表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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