如何通过传递字符串参数来获取报表中的特定记录? [英] How to get specific record in report by passing string parameter?
问题描述
我需要知道如何通过将字符串参数从vb.net传递到Crystal报表来在报表中获得特定记录?例如-我的表单中有文本框,按钮和crystalreportviewer.当用户使用它时,他会在文本框中写特定的单词并单击查看报告按钮,然后它将自动找出特定的记录并在报告中显示出来.请帮帮我.
I need to know how can I get specific record there in report by passing string parameter from vb.net to crystal reports? For example - I have text box, button & crystalreportviewer there in my form. When user will use it he will write specific word there in the text box & click on view report button then it will automaticlly find out the specific record & show it there in report. Please help me.
推荐答案
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.
这篇关于如何通过传递字符串参数来获取报表中的特定记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!