代码中的Crystal Report调用命令表 [英] Crystal Report Call Command Table in Code

查看:88
本文介绍了代码中的Crystal Report调用命令表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在代码中调用命令,而不是对查询进行硬编码,以便即使在报告中添加了任何其他字段,我也不必在代码中进行更改..

I need to call the command in the code instead of hard coding the query so that even if any additional field is added in the report I dont have to make changes in the code..

SELECT * FROM employee
  WHERE emp_id='{?emp_id}'

推荐答案

看看这篇文章: ^ ]

就像其中显示的方式一样,您也可以在运行时为报表设置数据集.现在,由于您可以在运行时设置数据集,因此可以设置任何查询以获取该数据集结果.
Have a look at this article: Creating Crystal Reports using C# with Datasets[^]

Just the way shown in it, you can set the dataset at runtime too, for the report. Now, since you can set the dataset at runtime, you can set any query to get that dataset result.


这篇关于代码中的Crystal Report调用命令表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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