在crystal report中汇总一个double数据类型的列 [英] Sum a column of double datatype in crystal report

查看:113
本文介绍了在crystal report中汇总一个double数据类型的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,在我的水晶报告中,我有数据类型字符串列。它们包含数字值和字符值,如: -



标记

20

AB
30

35



Marks是列的名称。我需要显示这一栏的总数如下:

Marks

20

AB

30

35

---

85



我该怎么办。



我尝试了什么:



i将标记列数据类型从字符串转换为double 。但它没有用。

sir, in my crystal report i have column of datatype String. and they contain number values and character values both like :-

Marks
20
AB
30
35

Marks is the name of column. i need to show total of this column like:
Marks
20
AB
30
35
---
85

how can i do it.

What I have tried:

i convert the marks column datatype from string to double. but its not working.

推荐答案

我在调用水晶报告之前在代码中进行转换。在数据表中添加另一列。使用该值仅保留任何具有字母的行的数值和零。您可以使用IsNumeric函数确定它。然后显示THAT列的总和,而不是原始列的总和。
I'd do the conversion in code before calling the crystal report. Add another column to your datatable. Use that one to hold only the numeric values and zeros for any rows that have letters. You can determine that with the IsNumeric function. Then show the total of THAT column instead of the total of the original column.


这篇关于在crystal report中汇总一个double数据类型的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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