RDLC与语法VB net的帮助 [英] RDLC help with Syntax VB net

查看:99
本文介绍了RDLC与语法VB net的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果全部评估为true或全部评估为false,则此代码将给出数据集(访问后端数据库)的正确结果.

然而;如果有些是错误的,有些是正确的,那么答案似乎是
拿走.00的那些是假的,并将它们添加到总和.我认为这对我现在评估结构的方式是一个问题.任何帮助,将不胜感激.我是VB net的新手,尝试构建条件时键入RDLC会引起混淆.

我应该在$ 240.00的地方得到$ 240.75
Confirmed.value为布尔值,serviceCost为货币数据类型.

我的目标是取得服务成本的总和,然后减去那些评估为假的结果,以获得最终结果.


-------------------------------------------------- ----------------
= FormatCurrency(Sum(str(Fields!ServiceCost.Value)-(str(Fields!ServiceCost.value and Fields!Confirmed.value = False))))

This Code gives the correct result of the dataset ( access backend data base) if all evaluate to true or all evaluate to false.

However; If some are false and some are true then the answer seems
to pick up the .00 of the ones that are false and adds them to the Sum. I believe this to be a problem with the way it''s evaluating the structure as i have it now. Any help would be appreciated. I am new to VB net and find the RDLC confusing when trying to construct and if then type condition.

Where I should expect $240.00 I end up with $240.75
Confirmed.value is Boolean and serviceCost is currency datatype.

What my objective is on this is to take the sum of service cost and then deduct those that evaluate to false to get the final result.


------------------------------------------------------------------
=FormatCurrency(Sum(str(Fields!ServiceCost.Value) -(str(Fields!ServiceCost.value and Fields!Confirmed.value=False))))

推荐答案

240.00我最终得到了
240.00 I end up with


240.75
Confirmed.value为布尔值,serviceCost为货币数据类型.

我的目标是取得服务成本的总和,然后减去那些评估为假的结果,以获得最终结果.


-------------------------------------------------- ----------------
= FormatCurrency(Sum(str(Fields!ServiceCost.Value)-(str(Fields!ServiceCost.value and Fields!Confirmed.value = False))))
240.75
Confirmed.value is Boolean and serviceCost is currency datatype.

What my objective is on this is to take the sum of service cost and then deduct those that evaluate to false to get the final result.


------------------------------------------------------------------
=FormatCurrency(Sum(str(Fields!ServiceCost.Value) -(str(Fields!ServiceCost.value and Fields!Confirmed.value=False))))


SELECT SUM(yourfield)从yourtable那里yourvalue = 1
SELECT SUM( yourfield ) FROM yourtable WHERE yourvalue = 1


这篇关于RDLC与语法VB net的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆