English 中文(简体)
为何不使用此表达式来表达“ 报告查看” 字段的功能?
原标题:Why isn t this expression for a ReportViewer field field working?

我在一份报告中写了个计算范围:

=IIf(Fields!Log_Total.Value > 0, (Fields!Log_Cost.Value + Fields!Labor_Cost.Value + Fields!Part_Cost.Value + Fields!Other_Costs.Value) / Fields!Log_Total.Value, 0)

就我所看到的一切而言,这是我试图完成的正确的语法, 基本上, 检查为零, 如果不是零的话, 增加这些和除以这个。 当我运行报告时, 字段就以# ERR 的形式出来。 以上所有字段都是数据集的一部分, 我知道这是正常的。 请帮助 。

问题回答

表达式本身似乎很好。 否则您就会在发布报告时立即出错 。

和中一个或多个字段是否在数据源中具有值null ?如果是这种情况,该数值可能无效。

您确定所有值实际上都有数字类型吗? 请确定其中没有任何值以 < code> string 或数据库中的东西返回 。





相关问题
Open PDF Programmatically in One Page View

I have a 2005 Reporting Services report that I display as a PDF through the report viewer control. I would like to know how I can have the PDF be viewed in the "one page at a time mode". Right now it ...

ASP.NET ReportViewer Google Chrome CPU usage

We have found an interesting issue between ASP.NET 3.5 and ReportViewer with Google Chrome. Our set of pages work fine until a ReportViewer control displays a report. Google Chrome then eats up 50% ...

Where to install ReportServer

I have 2 servers (IIS & SQL). A web site on the IIS server uses the ReportViewer web control. Should ReportServer be installed on the IIS box or the SQL box. (IIS is in the DMZ) TIA J

Creating a PDF of a Dynamics CRM 4.0 report programmatically

We are currently in the midst of upgrading our CRM 3.0 installation to CRM 4.0. One of the things we were doing from our external web site is pulling a PDF of a report using the ReportViewer control ...

热门标签