4

I use Crystal Reports to show an .rpt file in an asp.net page.

When I run both at server, the CR's preview on design software and the WebPage(IE) where the CR viewer is embedded, the reports shows the barcode and can be printed.

(the barcode is a function Bar128AB( *BarTextIn*, *Subset* ) )

BUT when I run it from another computer or from another browser(Firefox, Chrome) on the same server, the barcode shows the input string(BarTextIn) from Bar128AB function and not the result(final barcode) of the function.

The font which is used to represent the barcode is Code 128AB HR, which has restricted embeddability, but I don't mind for exporting it in PDF, just view and print it.

  • HOW can I fix it?
  • How can the rest browsers(Firefox, Chrome) on the server show the barcode properly?
  • How can another computer show the barcode properly?
aknet
  • 63
  • 6
  • Looks like CR uses both custom font (installed only on server) and some kind of ActiveX object (usable only in IE) to display barcode font. Cannot you use some kind of free barcode font and custom function to prepare data to use that font? We have done that locally (in desktop application), but we have no experience with web viewer unfortunately. – Arvo Feb 27 '15 at 12:15
  • @Arvo - The Bar128AB function is custom. I tried other fonts, and had the same results. As for the ActiveX you might be right about working properly only on IE and not on Firefox or Chrome, but at least it should work on client with IE. – aknet Feb 27 '15 at 14:30

2 Answers2

1

You need to install a couple of packages in order to show the barcode properly.

  • Install the latest package of crystal reports
  • Install this patch for the font with fsType value 0 to achieve installation

Also according to this thread you can try to print the page and see if barcode its works

Community
  • 1
  • 1
mr antoni
  • 595
  • 1
  • 6
  • 17
  • Indeed, the report prints the barcode even if it's not shown in the report on the client. But only on IE. Installing the CR Support Pack 13 as you suggested solved the problem showing the barcodes on Firefox and Chrome(server and client), but they're not printable. Cracking the fonts with TTFPATCH enables the printing on rest browsers. But will not work if the server is not restarted after the installation of the cracked fonts. Thanks a lot for the solution! – aknet Mar 04 '15 at 09:52
  • On Firefox and Chrome the print button is not working because of ActiveX. So it's needed to write proper code in order to check the browser. If the browser is IE then **PrintMode.ActiveX** will continue doing the job, otherwise use **ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, true, "report");** to export the report as PDF and then print it. – aknet Mar 04 '15 at 10:02
0

Try to install Code 128AB HR font on another computer and then to run the report there.
Is it working now? If it is, it means that your solutions need the font to be installed on any client (and I think it is).

If you think this is not the right solution for you, you could turn into javascript barcode tools (this is one).

Emanuele Greco
  • 12,551
  • 7
  • 51
  • 70
  • I already tried installing the fonts on the clients. with no result. Your javascript solution is not an option because the report works on the server on IE and the barcode is being computed on the .rpt file. There should be a solution so the clients can call the report with the correct form of the barcode. – aknet Feb 27 '15 at 14:24