我是否必须在 WebForm 中使用 Microsoft ReportViewer 的 ServerMode?
我正在尝试在 Web 应用程序中使用 Microsoft Reporting Services 查看 Hello world
报告。
我将创建的报告在查看时总是会刷新(即没有保存的数据),因此我认为没有理由使用报告管理器。
我想将 rdlc
文件包含在我的 Web 应用程序本身中,其中我将有一个托管 ReportViewer
的 aspx
页面。
我尝试过这个希望 Local
也可以意味着网络应用程序的本地...
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = "~/Reporting/Hello World.rdlc";
ReportViewer1.LocalReport.Refresh();
但事实似乎并非如此。当我查看我的页面时,出现以下错误。
本地报表处理期间发生错误。报表定义 对于报告 'D:[我的 Web 应用程序的本地路径 source]\~/Reporting/Hello World.rdlc' 尚未指定 无法 找到路径的一部分'D:[我的网络应用程序的本地路径 源]\~\Reporting\Hello World.rdlc'。
I'm trying to view a Hello world
report using Microsoft Reporting Services in a web application.
The reports I'll be creating are always refreshed when viewed (ie. no saved data) so I see no reason to use the Report Manager.
I want to include the rdlc
file's in my web application itself where I'll have an aspx
page that hosts the ReportViewer
.
I've tried this hoping that Local
could also mean local to the web app...
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = "~/Reporting/Hello World.rdlc";
ReportViewer1.LocalReport.Refresh();
But that doesn't seem to be the case. I get the following error when I view my page.
An error occurred during local report processing.The report definition
for report 'D:[local path to my web application
source]\~/Reporting/Hello World.rdlc' has not been specified Could not
find a part of the path'D:[local path to my web application
source]\~\Reporting\Hello World.rdlc'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,本地处理模式意味着 RDLC 文件位于本地源,而不是由 SQL Server 生成。
从错误消息来看,您的斜杠似乎颠倒了。尝试调整路径,或者更具体地说,尝试将斜杠的方向从 / 更改为 \
它应该可以工作。
Yes, Local Processing Mode means that the RDLC file is located as a local source, and not generated by the SQL Server.
From the error message, it looks like you have your slashes inverted. Try playing around with the path, or more specifically, try changing the orientation of your slashes from / to \
It should work.