升级后,Crystal Reports在数字字段中显示#### [英] Crystal Reports displays #### in numeric fields after upgrade

查看:109
本文介绍了升级后,Crystal Reports在数字字段中显示####的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级了包含Crystal Report文件的Visual Studio解决方案。自升级以来,当字段太狭窄而无法显示其值时,报告将显示交叉阴影线(也称为数字符号:#####)。以前没有这样做。有什么简单的解决方案吗?



我有9个报告,尽管我都对它们进行了测试,并修复了看起来太窄的字段的宽度,但是当我使用不同的数据集时,我总是



我发现在大多数情况下,只有几个像素丢失了。在旧的报告中,我什至可以看到有些数字在边缘处被切掉了一些,但这并不能阻止读取这些值。新版本的Crystal Reports将这些值替换为#####。



我想我有两种解决方案:将所有字段扩大几个像素或缩小字体尺寸。我不确定是否有办法在全球范围内执行此操作,或者我是否必须针对每个字段手动执行此操作。 Crytsal Reports,在这样的字段中,我希望能够使用Courrier New 10点显示5位数字?



我使用Visual Studio 2012,.Net 4.5和SAP Crystal Reports,Microsoft Visual Studio SP5的开发人员版本。旧的报表来自将Crystal Reports嵌入VS的时间。

解决方案

如果无法格式化字段以适应数据库中的最大值,那么如果不使用非打印格式,您将没有很多 good 选项。这两件事可能对您有用:


  1. 启用这些字段的剪切,使它们不再显示'## #。您可以通过右键单击出现此问题的数字字段,选择格式字段,然后转到数字选项卡,然后单击自定义来执行此操作。应该有一个复选框,显示允许域剪辑。在我看来,这很危险,因为值的显示方式可能与实际数值不同。


  2. 将值大于其字段的字段设置为增大在画布上的大小。必要时,这会将字段扩展到页面(我认为没有办法横向执行此操作)。您可以通过右键单击字段,选择格式字段,然后转到通用选项卡并选择可以增长来访问此选项。请注意,这不适用于数字字段,因此您必须先将其转换为字符串。


编辑:现在我考虑了一下,这里有一种 水平扩展字段的方法,但是要实现这一点要困难一些,它将需要计算并通过传递所需的宽度一个公式。您可以通过右键单击这些字段,选择大小和位置,然后单击宽度旁边的公式按钮来访问此公式。


I upgraded a Visual Studio solution containing Crystal Report files. Since the upgrade, the reports are displaying cross hatches (also called number signs: #####) when fields are too narrow to display their values. It was not doing that before. Is there any easy solution?

I have 9 reports, and although I tested them all, and fixed the width of the fields that appeared to be too narrow, when I use different data sets, I always find new cases where the field is too narrow to display the value.

What I have found out is that most of the time, only a few pixels are missing. On the old reports, I can even see that some numbers are cut a bit on the edge, but it does not prevent to read the values. The new version of Crystal Reports replaces those values by #####.

I guess I have two solutions: Enlarge all the fields by a few pixels or reduce the font size. I am not sure though if there is a way to do this globally, or if I have to do this by hand for every field.

Is there an easy way to tell Crytsal Reports, in such field, I want to be able to display let's say 5 digits using Courrier New 10 points?

I using Visual Studio 2012, .Net 4.5 and SAP Crystal Reports, developer version for Microsoft Visual Studio SP5. The old reports were from the time when Crystal Reports was embedded in VS.

解决方案

If you can't format the fields to accommodate the largest values from the database, then you don't have many good options without moving to a non-printable-format. These two things might be useful to you:

  1. Enable the clipping of those fields so that they no longer show the '###'. You can do this by right-clicking the number fields having this issue, selecting "Format Field", then go to the "Number" tab, then click "Customize". There should be a check box that reads "Allow Field Clipping". In my mind, this is pretty dangerous as values can appear differently than their true numerical values.

  2. Set the fields to grow when the values are larger than their field size on the canvas. This will extend the fields down the page (I don't believe there is a way to do this horizontally) when necessary. You can access this option by right-clicking the fields, selecting "Format Field", then go to the "Common" tab and select "Can Grow". Note that this doesn't work for numeric fields so you will have to convert it to a string first.

EDIT: Now that I think about it, there is a way to extend a field horizontally, but it's slightly more difficult to pull off and will require calculating and passing the desired width via a formula. You can access this formula by right-clicking those fields, selecting "Size and Position" and clicking the formula button next to "Width".

这篇关于升级后,Crystal Reports在数字字段中显示####的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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