将参数传递给晶体报告 [英] Passing Parameter to crystal Report
本文介绍了将参数传递给晶体报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将参数As@Name传递给vb.net代码中的水晶报告...但是当报告打开时它会提示我输入离散参数值...下面是传递参数的代码行。 />
I am passing parameter As "@Name" to crystal report in vb.net code...But when report opens it prompts me to enter discrete parameter value...Below is the line of code to pass parameter.
Report.SetParameterValue("@Name", CmpName)
请帮我解决这个问题。
Please help me to solve this.
推荐答案
crReportDocument.DataDefinition.FormulaFields.Item("Dataini").Text = "''" & DTpini.Value.Date & "''"
crReportDocument.DataDefinition.FormulaFields.Item("Datafim").Text = "''" & Dtpfim.Value.Date & "''"
crReportDocument.DataDefinition.FormulaFields.Item("Machine").Text = "''" & Trim(TXT_MACHINE.Text) & "''"
在设计参数时,参数的确切名称是什么?它真的有@在它面前吗?因为我认为你不需要它。
如果不是这样的话,你能不能包含更多的代码。在显示报告之前看看你是否正在做其他事情,以及如何显示报告等,这将是很好的。
What is the exact name of the Parameter when you are designing it? Does it really have the @ in front of it? Because I don''t think you need it.
If that''s not it, could you include a bit more code. It would be nice to see if you are doing anything else before displaying the report, and how you are displaying the report, etc.
这篇关于将参数传递给晶体报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文