如何在水晶报告vb.net中声明变量? [英] how to declare variable in crystal report vb.net?

查看:87
本文介绍了如何在水晶报告vb.net中声明变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在做一个关于水晶报告的项目。

我需要对总产品进行一些计算。

Consignment_Sales_Report .SuppMargin是我想要总和的金额。

但是当我点击保存时,会出现一条消息,说这里需要一个数字字段或货币编号字段。

任何人都可以帮助我吗?我哪里错了?

或者任何人都可以提供一些有用的链接供参考?

以下是我的代码。

 Sum({Consignment_Sales_Report.SuppMargin})

解决方案

使用crystal sintaxe声明局部变量:

Local NumberVar x:= Sum({Consignment_Sales_Report.SuppMargin});



最好的问候


确保,

Consignment_Sales_Report.SuppMargin

数字字段。它不应该是字符串或任何其他类型的列



其他方式是...

总和( ToNumber ({Consignment_Sales_Report.SuppMargin}))





快乐编码!

:)


亲爱的,

我尝试了如下所示的代码。

但仍然得到同样的错误。



本地numbervar x:= sum(ToNumber({Consignment_Sales_Report.Quantity})); 



 sum(ToNumber({Consignment_Sales_Report.Quantity})); 



 local numbervar x: =总和({Consignment_Sales_Report.Quantity}); 


Hi all,
I doing a project regarding crystal report.
I need to make some calculation of the total product.
Consignment_Sales_Report.SuppMargin is the amount I want to sum.
But when I click save, it come out a message say that "A number field or currency number field is required here."
Can anyone help me? Where is my wrong?
Or anyone can provide me some useful link for reference?
Below is my code.

Sum ({Consignment_Sales_Report.SuppMargin} )

解决方案

To declare a local variable using crystal sintaxe :
Local NumberVar x := Sum ({Consignment_Sales_Report.SuppMargin} );

best regards


make sure,
Consignment_Sales_Report.SuppMargin
is number field. it should not be string or any other type of column

Other way is...

sum( ToNumber({Consignment_Sales_Report.SuppMargin}) )



Happy Coding!
:)


Dear all,
I tried code as shown below.
but still get the same error.

local numbervar x :=sum(ToNumber({Consignment_Sales_Report.Quantity}));


sum(ToNumber({Consignment_Sales_Report.Quantity}));


local numbervar x :=sum({Consignment_Sales_Report.Quantity});


这篇关于如何在水晶报告vb.net中声明变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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