报告查看器问题
我正在使用报告查看器生成报告。以下是我正在使用的代码
ReportViewer1.LocalReport.ReportPath = @"C:\Users\Saga\Desktop\projectvn\VehicleReport.rdlc";
ReportParameter Param1 = new ReportParameter("@BrandName", "Toyota");
ReportParameter[] p1 = { Param1 };
ReportViewer1.LocalReport.SetParameters(p1);
它给出了以下异常
An error occurred during local report processing
有人可以帮忙吗?
I'm using Report viewer to generate the report.following is the code i'm using
ReportViewer1.LocalReport.ReportPath = @"C:\Users\Saga\Desktop\projectvn\VehicleReport.rdlc";
ReportParameter Param1 = new ReportParameter("@BrandName", "Toyota");
ReportParameter[] p1 = { Param1 };
ReportViewer1.LocalReport.SetParameters(p1);
It gives the following Exception
An error occurred during local report processing
Can any one plz help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
确保您已在报告中添加参数(“菜单报告”>“报告参数”),如果您已完成此操作,请确保未将其标记为内部,否则该参数为只读。
Make sure you've added the parameter in the report (Menu Report > Report Parameters) and if you have done that already, make sure that is not marked as internal otherwise the parameter is read-only.
当然,在我看来,参数“@BrandName”指定不正确...您可以在实际报告文件中仔细检查其名称吗?也许它有不同的大写(例如“@Brandname”)或间距(“@Brand_Name”)或没有 at 符号(“BrandName”)。,,
Sure looks to me like the parameter '@BrandName' is specified incorrectly... can you double-check its name in the actual report file? Perhaps it has different capitalization (e.g. "@Brandname") or spacing ("@Brand_Name") or no at-sign ("BrandName").,,
看起来绝对是报告方。确保你有一个名为 @BrandName 的参数,并且无论控件是什么,确保它的使用方式如下:
这只是标准的,还有其他方法用于不同的事物,例如字段等
Definatly looks to be the report side. Make sure you have a paramter called @BrandName and that what ever the control is, make sure its using it something like:
This is just standard there are other methods for different things like fields etc