且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过传递字符串参数来获取报表中的特定记录?

更新时间:2023-02-25 16:42:30

kingcoder0110写道:
kingcoder0110 wrote:

y找出具体记录&在报告中显示出来

y find out the specific record & show it there in report



1.设计UI
2.单击按钮时,将文本框的文本作为参数存储到DB或Report
3.一种方法-使用报表中的参数获取数据.将编写查询,使其将该参数作为输入,并将结果用作报告的数据集
另一种方法-将参数传递到数据库,并使用该参数从DB获得所需的结果,将此结果数据集作为输入传递给Crystal报表.



1. Design the UI
2. On button click, store the text of the textbox as a parameter to DB or Report
3. One way - Use the parameter in report to get data. Query would be written such that it takes that parameter as input and the result would be used as a dataset for report
Other way - pass the parameter to database and get the desired result using that parameter from DB, pass this result dataset as an input to Crystal report.