报告查看器问题

发布于 2024-09-16 23:09:00 字数 429 浏览 4 评论 0原文

我正在使用报告查看器生成报告。以下是我正在使用的代码

 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

半夏半凉 2024-09-23 23:09:01

确保您已在报告中添加参数(“菜单报告”>“报告参数”),如果您已完成此操作,请确保未将其标记为内部,否则该参数为只读。

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.

开始看清了 2024-09-23 23:09:01

当然,在我看来,参数“@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").,,

左岸枫 2024-09-23 23:09:01

看起来绝对是报告方。确保你有一个名为 @BrandName 的参数,并且无论控件是什么,确保它的使用方式如下:

[email protected]

这只是标准的,还有其他方法用于不同的事物,例如字段等

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:

[email protected]

This is just standard there are other methods for different things like fields etc

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文