水晶报表问题
我有一个表,其中包含物品及其价格,这些价格部分以美元为单位,其余以英镑为单位,这些物品分为几个部分
,我想在水晶报表中使用修改后的 Sum 函数,以便在每个部分的末尾显示 以磅为单位对总数进行分组
像 C# 中那样
int price=0;
foreach (item it in items)
{
if (it.curr=="$")
{ price+=it.price*DollarPrice }
else
price+=it.price;
}
return price;
这正是我想在水晶报告中做的,但我不知道如何做到这一点
所以如果您有任何想法请帮助我,
问候,
Baher。
I have a Table which Contains items and its prices and those prices some in Dollars and the rest in pounds and the items are divided into sections
and I want to use a modified Sum function in the Crystal Report so as to show at the end of each group the total in pounds
like that in C#
int price=0;
foreach (item it in items)
{
if (it.curr=="$")
{ price+=it.price*DollarPrice }
else
price+=it.price;
}
return price;
That's exactly what i want to do in crystal reports but i dont have any clue how to do so
So if you have any Idea please help me,
Regards,
Baher.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试使用报告的公式编辑器来执行此操作。
You could try to do that using the report's formula editor.
首先,下一个建议假设您的数据表中有一个名为 Curr 的列,它存储货币种类。您必须在 CR 的公式字段中创建一个新公式,并输入如下内容:
然后将此公式放在“详细信息”部分中。
First of all, the next recomendation assumes you have a column in your datatable called Curr which stores the kind of currency. You have to make a new formula in the Formula Field of your CR and put something like this:
And you put this Formula in your Details Section.