通过 Web 正确渲染,但在使用 WinForms ReportViewer 时渲染时不计算表达式

发布于 2024-11-14 08:02:46 字数 2806 浏览 2 评论 0原文

我遇到一个问题,在 SSRS 2005 上运行的 .RDL 报告(远程处理)将在通​​过 Web 浏览器查看时使用评估的表达式进行渲染:

http://my-server/ReportServer/Pages/ReportViewer.aspx?/Group%20Reports/Report_Lines&rs:Command=Render

但是,当在 C# 应用程序中运行时(通过 Microsoft.Reporting.WinForms.ReportViewer 控件),似乎报表呈现时无需评估报表中内置的表达式。

需要注意的一些事情:

  • myReportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
  • 这些表达式通常具有条件格式性质 - 颜色变化取决于值等。
  • 据我所知(我花了几个小时谷歌搜索/MSDN/查看这里等)问题在于在服务器端运行表达式 eval 时的信任/凭据。

另外,调用报告时 ReportServer__06_07_2011_07_57_20.log 中的差异:

WEBforms
-=-=-=-=-
w3wp!library!7!06/07/2011-11:10:47:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports).
w3wp!library!7!06/07/2011-11:10:49:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:49:: Call to GetPropertiesAction(/Scorecard Reports/Report_Lines, PathBased).
w3wp!library!7!07/06/2011-11:10:59:: i INFO: Call to RenderFirst( '/Scorecard Reports/Report_Lines' )
w3wp!library!7!07/06/2011-11:11:01:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!7!07/06/2011-11:11:01:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:03:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!1!07/06/2011-11:11:03:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:03:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!1!07/06/2011-11:11:03:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:04:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!1!07/06/2011-11:11:04:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:31:: i INFO: Call to RenderFirst( '/Scorecard Reports/Report_Lines' )
-=-=-=-=-

...vs...

WINforms
-=-=-=-=-
w3wp!library!7!06/07/2011-11:13:08:: i INFO: Call to RenderFirst( '/Scorecard Reports/Scorecard_Report' )
w3wp!webserver!7!06/07/2011-11:13:08:: i INFO: Processed report. Report='/Scorecard Reports/Scorecard_Report', Stream=''
-=-=-=-=-

基本上,我很乐意去日志拖网以获取更多信息 - 但我不知道在哪里查看。

有人告诉我下一步该去哪里吗?

tl;dr: Winforms.ReportViewer 计算表达式,而 Webforms.ReportViewer 计算表达式。

I've got an issue where a .RDL report (remote processing) running on SSRS 2005 will render with expression evaluated when viewed via web browser:

http://my-server/ReportServer/Pages/ReportViewer.aspx?/Group%20Reports/Report_Lines&rs:Command=Render

However, when run inside a C# app (via Microsoft.Reporting.WinForms.ReportViewer control) seemingly the report renders without evaluating the expressions built into the report.

Some things to note:

  • myReportViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
  • The expressions are generally of a conditional formatting nature - color changing dependant on value etc etc.
  • As far as I can tell (I've spent a few hours Googling / MSDN / looking here etc) the issue is down to trust / credentials when running the expression eval at the server end.

Also, the differences in ReportServer__06_07_2011_07_57_20.log when calling the report:

WEBforms
-=-=-=-=-
w3wp!library!7!06/07/2011-11:10:47:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:48:: Call to GetPermissionsAction(/Scorecard Reports).
w3wp!library!7!06/07/2011-11:10:49:: Call to GetPermissionsAction(/Scorecard Reports/Report_Lines).
w3wp!library!7!06/07/2011-11:10:49:: Call to GetPropertiesAction(/Scorecard Reports/Report_Lines, PathBased).
w3wp!library!7!07/06/2011-11:10:59:: i INFO: Call to RenderFirst( '/Scorecard Reports/Report_Lines' )
w3wp!library!7!07/06/2011-11:11:01:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!7!07/06/2011-11:11:01:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:03:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!1!07/06/2011-11:11:03:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:03:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!1!07/06/2011-11:11:03:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:04:: i INFO: Call to RenderNext( '/Scorecard Reports/Report_Lines' )
w3wp!cache!1!07/06/2011-11:11:04:: i INFO: Session live: /Scorecard Reports/Report_Lines
w3wp!library!1!07/06/2011-11:11:31:: i INFO: Call to RenderFirst( '/Scorecard Reports/Report_Lines' )
-=-=-=-=-

...vs...

WINforms
-=-=-=-=-
w3wp!library!7!06/07/2011-11:13:08:: i INFO: Call to RenderFirst( '/Scorecard Reports/Scorecard_Report' )
w3wp!webserver!7!06/07/2011-11:13:08:: i INFO: Processed report. Report='/Scorecard Reports/Scorecard_Report', Stream=''
-=-=-=-=-

Basically, I'm happy to go log trawling for more info - but am stuck as to where to look.

Has anyone got a clue for me on where to look next?

tl;dr: Winforms.ReportViewer is not evaluating expressions, whereas Webforms.ReportViewer is evaluating expressions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文