如何获取C#代码中的Crystal Reports参数字段以作为参数传递...

问题描述:

我已在Crystal报表中将两个参数字段设置为FromNumber和ToNumber,
在提示上述值时,我在提示窗口的两个字段中输入了两个不同的值,如何在我的代码中获取这些值以将它们作为参数发送给方法...

i''ve set two parameters fields in crystal report as FromNumber and ToNumber,
on prompting the above values i enter two diffrent values for both fields on prompting window, how can i get these values in my code to send them as parameters to a method...

尝试一下...

Try This...

Dim pmtDiscValue As New ParameterDiscreteValue

pmtDiscValue.Value = txtMinValue.text
cryRpt.ParameterFields("FromNumber").CurrentValues.Add(pmtDiscValue)
pmtDiscValue.Value = txtMaxValue.text
cryRpt.ParameterFields("ToNumber").CurrentValues.Add(pmtDiscValue)




让我知道您是否有与此帖子相关的问题.




Let me know if you have any question related this post.


尽管它们不是C#语言,但对于指示方向还是足够好:
VB.NET Crystal Reports字符串参数 [使用vb.Net将参数从TextBox传递到Crystal报表a> [ ^ ]

看看他们,看看它是如何完成的.试试吧.
Though they are not in C# yet good enough for direction:
VB.NET Crystal Reports String parameter [^]
For passing parameter from TextBox to Crystal report Using vb.Net[^]

Look at them and see how it is done. Try out.