1
votes

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.

2
What version did you upgrade from and to?Alec.
@Telexx I don't know which version of CR the reports were created with. If I open one of them in VS2010, all it tells me is that the report was created in May 2002, and that it was last modified in April 2005. We upgraded the reports to the latest version of CR for VS2012 found here: scn.sap.com/docs/DOC-35074Jean-François Beauchamp
If CR didn't behave that way, it could lead to some very big issues displaying incorrect numbers. Just select all the affected fields on the canvas and increase their size a bit in one action.Ryan
It is possible to attach a formula to the fonts and font sizes. I don't have VS installed right now, but in the Crystal designer you would go to the field properties, font tab, and click the X-2 next to either size or font.EvilBob22
@Ryan I understand that, and what you propose is what I did after VS2012 upgraded the reports. I then installed the software on my client's computer, and boom! There are still ### all over. The data they had to display today was different from the data I had for my tests.Jean-François Beauchamp

2 Answers

4
votes

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".

0
votes

Whenever I come across #### problem while displaying data to field, I just simply increase width of that crystal reports field