如何显示从db到crystal report的字段的确切值 [英] how to display the exact value of a field from db to crystal report

查看:71
本文介绍了如何显示从db到crystal report的字段的确切值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个字段名称序列号,其数据类型为nvarchar(25)。

因为我从前端输入数据为0001序列号。



数据作为0001保存在数据库中,但是当我尝试在数据库中的水晶报表中打印时。它将成为1.



如何进行更改?因为我希望它以与db中相同的方式打印为0001



任何人都可以帮助我。



我在google上看过很多帖子。所有人都建议将'000'作为字符串和totext函数使用。



我不想将最终结果作为字符串。



因为我可能会输入一些序列号为001或0001-2或OOO24-2

就像这样。



谢谢

Sudeshna

解决方案

转到元素,右键单击,选择格式化并将autoformat更改为文本。我没有CR在我面前,所以我不能一步一步地给出确切的信息,但基于此不应该很难找到。



如果这个帮助请花时间接受解决方案。谢谢。


右(0000& {table.field}),5)



使用前导零到固定长度的固定数字

Hi
I have a field name serial number whose datatype is nvarchar(25).
As i am entering data from front end as 0001 as serial number.

data is getting saved in database as 0001 but when i am trying to print it in crystal report from database. its coming as 1.

How do i make the change? As i want it to be printed the same way as it is there in db as 0001

can anyone please help me.

I have seen many posts in google. All are suggesting to make '000' as string and totext function to use.

I dont want to make the ultimate result as a string.

As it might happen that i might enter some serial numbers as 001 or 0001-2 or OOO24-2
like this.

Thanks
Sudeshna

解决方案

Go to the element, right click, select Formatting and change autoformat to text. I don't have CR in front of me so I cannot give exact step by step, but it shouldn't be hard to find based on this.

If this helps please take time to accept the solution. Thank you.


Right("0000"&{table.field}),5)

Padding a fixed number with leading zeros up to a fixed length


这篇关于如何显示从db到crystal report的字段的确切值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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