在C#中使用asp.net在Crystal报表中传递参数,即从文本框或下拉列表中获取值 [英] passing parameters in crystal reports using asp.net with c# ie taking values from textbox or dropdown list
本文介绍了在C#中使用asp.net在Crystal报表中传递参数,即从文本框或下拉列表中获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的项目中,我想使用Crystal报表.但是在Crystal报表中,如何传递参数(即,当用户在文本框中输入任何no时,它都是
应该显示该雇员的所有详细资料,并且在下拉列表中也应相同)
In my project i want to use crystal reports .but in crystal reports how to pass parameters(ie when user enters any no in textbox it
should display all deatails of that employe , and in dropdown list also the same )
推荐答案
但是您没有提及它是公式字段还是参数字段,但我同时给出了两个代码段
公式字段
Hi,
But you didn''t mention is it formula field or parameter field, but i give both snippets
Formula field
string strFormula ="";
strFormula = "{tblTable.fldField}=''" + txtParam.text + "''";
report.DataDefinition.RecordSelectionFormula = strFormula;
参数字段
Parameter field
string strParameter ="";
strParameter = txtCompanyName.Text;
report.SetParameterValue("Company", strParameter);
如果您解决了问题,请告诉我.
问候,
thatraja
please let me know if you solved your issue.
Regards,
thatraja
请举一个在水晶报表中从下拉列表中获取参数的示例...
please give example of taking parameter from dropdown in the crystal report ...
这篇关于在C#中使用asp.net在Crystal报表中传递参数,即从文本框或下拉列表中获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文