水晶报告摘要 [英] Crystal Report Summary

查看:78
本文介绍了水晶报告摘要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在处理水晶报告,我所做的是我在sql中为我想要的表编写一个程序,然后在csharp中的数据集中创建一个数据表(与我希望的列相同)然后我从表中获取表格sql并将其绑定到数据集中的数据表



我想要什么,

从数据集我创建水晶报告但所有数据都在字符串中格式所以我想在crstal报告中做总结,如总计,组总数。因为我在晶体报告中得到的所有数据都是字符串所以我应该怎么做才能更改数据类型以及如何在水晶报告中完成总计

Hi i am working with crystal report , what i do is i write a procedure in sql for my desired table and i create a datatable(WITH THE SAME COLUMNS AS MY DESIRED TABLE) in dataset in csharp then i get the table from sql and bind it to the datatable in dataset

WHAT I WANT ,
From dataset i create crystal report but all the data are in string format so i want to do summary in crstal report like total ,group total .since all my datas which i get in crystal report are in string so what should i do to change the datatype and how to do the total in crystal report

推荐答案

试试这个:



假设你有

数量栏 - 字符类型



1.根据数据数量列创建新列并将数据转换为数字调用QuantityNum

2.使用QuantityNum在报告中显示

3.按照你想要的方式计算这个字段。



工作正常。
Let try this:

Assumpt that you have
Quantity Column- Character type

1. Create new column based on data Quantity column and convert data to number call QuantityNum
2. Use QuantityNum to display in report
3. calculate this field as you want to do.

It is worked.


在Crystal中,我们有两种语法。



所以你可以通过创建一个使用ToNumber函数的公式来实现。编码字段可能包含非数字数据的可能性可能是个好主意 - 如下所示:



Within Crystal, we have two type of syntax.

So you can do it by creating a formula that uses the ToNumber function. It might be a good idea to code for the possibility that the field might include non-numeric data - like so:

If NumericText ({field}) then ToNumber ({field}) else 0





你也使用Val()函数来做到这一点。你可以看到更多细节(Val vs ToNumber http://kenhamady.com/cru/archives/81 [ ^ ])



和其他转换类型 http://crystaltricks.com/wordpress/?p=149 [ ^ ]



希望对你有用



you also use the Val() function to do that. you can see more details (Val vs ToNumber here http://kenhamady.com/cru/archives/81[^] )

and the others convert type here http://crystaltricks.com/wordpress/?p=149[^]

hope that is useful for you


这篇关于水晶报告摘要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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