Weird issue with barcodes on Crystal reports having a gap when printed through RDC on some users

GracefBase used Ask the Experts™
Hi,  can't find anything on this on the web, wondered if anybody has had this issue or knows what could cause it - I had set up a code 39 barcode on a crystal report, and when testing and printing through remote desktop connection from my log in works perfectly, however when other users log on and print, it brings up a gap through the barcode.  You can see the gap on the Crystal Report before you print on the other users but not on mine.  (Version 8.5 Crystal)  Wondered if it was a permissions issue, but I've checked and the other users seem to have the same permissions as me on the computer and domain.  Also given full permissions to all to the folder with the barcode installation files.  
Also logged on as other users from my PC with the same printer - same problem so its something to do with the users but no idea what.

Very strange one, hope experts can shed a light on this.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Does everybody have the same printer driver?



Do you mean locally? The printer drivers are set up on the terminal server and locally.  I tested under different users with the same printer driver from my machine so the set up was exactly the same only the user was different.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

CHanging the printer/printer driver can cause issues like that.  If everyone logged into your machine uses the same default printer than that isn't the issue.

Verify that when you log in as another user, they don't get a different pronter as the default.



Hi, No it was definitely the same printer driver as default.  Baffling!
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Just making sure because Crystal use the printer driver to render the previews.

It doesn't make any sense to me either.

One last idea.  Permissions on the font files

>> ...  it brings up a gap through the barcode ...

Not clear what you mean by this; is it that:

- a bar-code prints, but it contains one (or more) gaps (horizontally or vertically - which?)

- there is just blank space where the bar-code was expected to be.

- something else?

Assuming that what you mean is that nothing prints (i.e. blank space instead of the bar-code):

- Are you using a bar-code font for the Code 39 bar-code, or is the application generating raster images?

- Assuming that a font is being used, what format is your supplied Code 39 font?

- Assuming that it is a TrueType font (installed in the Windows 'Fonts' folder), can your 'other users' see this font?
e.g. open WordPad - is the font on the list of available fonts?


Hi Mlmcc - I had already given full permissions to font files.

Hi DansDad,
The barcode prints but has a big gap vertically through the middle of the barocde but not when from my logon.  I am using barcode fonts, I've tried ID automation code 39 and Free3of9, both had the same problem.  I didnt have the same problem with Freeof9 Extended but that one didnt scan properly.
Yes you can see the font in wordpad from the other users.
This seems to be only a problem in Crystal Reports - I've used the fonts in other programs without that problem.  
Any other ideas?

Since the barcode fonts are not working well, I would try the implementation of another product that does not use barcode fonts, such as the native generator mentioned here:

If that does not work, attach a screen-shot and that might give us some ideas.
>> ... has a big gap vertically through the middle of the barocde ...

If I'm interpreting this correctly, you mean that you appear (to the human eye) to end up with two separate small bar-codes, side-by-side.

If this is the case, it implies that the encoded data generated by Crystal Reports for the bar-code includes at least one character which is not present in the target font.

To confirm this out would require an analysis of the font, and of the data generated by the CR print function.
To 'capture' the print output from a standard Windows print driver, you'd select the 'print to file' option in the Print dialogue; no idea if CR has an equivalent.
If it was confirmed, it would indicate an incompatibility between CR (at least the bar-code generator part) and the selected font. But what could you then do about it?

If, on the other hand, you mean that you appear to end up with two bar-codes, one above the other, then this perhaps implies that the application is attempting to generate a tall bar-code by printing two copies of the bar-code sequence (in the knowledge that the font characters are not tall enough), one above the other, but that the 'line-spacing' between the two copies is incorrect.

Again, it would require an analysis of the CR 'print' output to confirm this.
Standard Code 3 of 9 bar-codes allow for the encoding of 43 characters and symbols, as follows:

- 26 upper-case alphabetic characters A->Z; code-points 0x43->0x5a)
- 10 digits 0->9; code-points 0x30->0x39
- 7 punctuation symbols:
  space; code-point 0x20
  dollar currency symbol; code-point 0x24
  percent symbol; code-point 0x25
  plus sign; code-point 0x2b
  hyphen-minus sign; code-point 0x2d
  period (full-stop); code-point 0x2e
  solidus (forward-slash); code-point 0x2f

In addition, the "*" character is used to encode the control 'Start' and 'Stop' control character at code-point 0x2a.

I've looked at the Free3of9 font, and this (TrueType) font includes all the above characters.

A point to note is that a bar-coded space character is present at code-point 32 (hexadecimal 0x20), which is the standard position for the space character in the ASCII code-set.

In the past, to avoid various problems, some bar-coded fonts included a blank space character at code-point 32 (0x20), and instead provide the bar-coded space character at a different position (typically code-point 44 (0x2c), which is the 'comma' symbol in standard ASCII).
The system then relied on the bar-code generator function to translate space characters (0x20) in the input data into the coded characters (e.g. at 0x2c) required by the target font.

Interestingly, the Free3of9 font includes (as well as the characters mentioned above):

0x20: bar-coded space character
0x2c: blank (space) character)
0x5f: bar-coded space character

So perhaps the explanation of your symptoms is that:

- Your own sample bar-code does NOT include a space character.

- Your user's sample bar-codes contain (at least one) space character.

- The CR bar-code generator function is translating space characters in the input data to another character (perhaps 0x2c), expecting that the target font will include a bar-coded space character at this code-point.

- The target font (e.g. the Free3of9 one) does NOT include a bar-coded space character at this translated position.

To confirm whether or not this is a possible explanation, just try to generate a bar-code (from YOUR user) which contains a space character, and check the results.
Interestingly, it appears that IdAutomation also used a 'space substitution' character with their fonts (in their case, the fonts encoded the bar-coded space as the ASCII "=" character) until 2011, when they released a new set of fonts which did not require this substitution - see
... and to confirm what your others users are generating for their Code39 bar-codes, modify the report (or create a test one) which just uses a standard fixed-pitch font (e.g. Courier) for the bar-code field, instead of using the bar-code font.

Note down the generated characters, and check how they compare with the input data.

Assuming that the input data includes a space character, what is the corresponding generated bar-code field character?


The same report is used in both cases and doesnt have a space in the input data its simply a 5 digit code with a star at the beginning and end for the code 39.

Please see attached doc with screenprints - the left from logging on as onother user and the right from logging on as me.

I've run out of ideas!

It certainly looks as though:

- an additional character is being inserted in the data being encoded;

- the additional character is NOT one of the 43 characters available in the font being used.

But why, and what that characters is I could not say.

Did you try (as I mentioned before) to set up a report based on your existing one, but which for the bar-coded field uses everything (transformations, formulae, etc, or whatever CR calls them) as per the original EXCEPT that the font chosen is a standard text font.

Do you then still get a gap between the second and third digits, as per your scanned examples using the bar-code font?


Oh DansDad thanks so much you are a star.
When I changed the format to courier on one of the log ins that were having problems, I found there was a comma in the middle of the number!  I changed the formula from

ToText ({MRid},0, "").  

and the problem was resolved.  

I think the reason why I didnt have this comma on my log in was a change I had made to Crystal Report number format in the options, which must be per user not per machine.

Thanks again.


Brilliant thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial