简体   繁体   English

使用Crystal Report时,具有Numeric DataType的列返回带有十进制的值

[英]Column with Numeric DataType returns a value with decimal upon using Crystal Report

SQL Server 7.0 SQL Server 7.0
VB 6.0 VB 6.0
Crystal Report 8 水晶报表8

Column Name: myColumn 列名称:myColumn
Data Type: numeric 数据类型:数字
Length: 9 长度:9
Precision: 10 精度:10
Scale: 0 规模:0

Lets say myColumn has a value of: 1, 2, 3, 4, and 5 假设myColumn的值为:1、2、3、4和5
When I check it on Enterprise manager and Query analyzer, the results are fine. 当我在企业管理器和查询分析器上检查它时,结果很好。 1, 2, 3, 4, and 5 1、2、3、4和5
But whenever I fetch the data on crystal report using vb, the results are: 1.0, 2.0, 3.0, 4.0, 5.0 但是每当我使用vb在Crystal Report上获取数据时,结果都是:1.0、2.0、3.0、4.0、5.0

It just sounds like the number format in your report is set to give a decimal by default. 听起来好像报告中的数字格式默认设置为提供小数。 if you change the formatting in the report it should fix your issue 如果您更改报告中的格式,则应该可以解决您的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM