本文介绍了Crystal Reports假定存储过程中列的数据类型不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的原因是,Crystal Reports Engine有时会认为从某个存储过程返回的字段实际上是 money 类型的字段是一个 varchar 255 ?因为我不能应用任何数字格式。

What can be the reason that Crystal Reports Engine sometimes thinks that a field, that is returned from some stored procedure, that is in fact is of type money, is a varchar 255? Because of that I cannot apply any number formatting.

推荐答案

您确定将字段投放为货币吗?最近是否更改了数据类型,而不是之后选择在Crystal Reports中验证数据库?如果是这样,它可能只是水晶报告困难;

Are you sure you have the field cast as money? Did you change the datatype recently, and not select Verify Database in Crystal Reports afterwards? If so, it could just be Crystal Reports being difficult; I've seen it do strange things from time to time with no real expalantion why.

也就是说,你可以创建一个包含以下内容的公式字段:

That said, you could always create a Formula Field that contains:

ToNumber({YourTable.YourField})

然后,您可以在报表上显示此公式字段,并将字号格式应用到字段。我知道这不是最好的答案,但它是一个可行的解决方法。

You can then show this formula field on your report, and apply number formatting to the field. I know it's not the best answer, but it's a viable workaround.

这篇关于Crystal Reports假定存储过程中列的数据类型不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 10:20