• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3393
  • Last Modified:

Displaying Images in A Crystal Report

HI experts,

My program have a module that manage products, and each product has a barcode which is generated in a picture box (only on presentation, not database).

I want to display one or more barcode (of each product) in a Crystal Report.

Example : When  I choose print 10 records ( 10 barcodes of a product or 10 barcodes of 10 products ), then program will display it in a CR.

how can i do ?

Thanks for help

Best Regards
trung85gn
0
trung85gn
Asked:
trung85gn
  • 8
  • 7
  • 4
  • +4
1 Solution
 
frodomanCommented:
That's a very large question - too large to answer in this formum really.  

How about if you tell us which part of it you're having trouble with and we'll try to help from there.  Are you struggling with printing the barcodes?  With selecting how many records to print?  With hooking C# to a Crystal Report in general?

frodoman
0
 
JeffvClaytonCommented:
A barcode is just a font, so any report you can design that displays words can display barcodes. That is, You do not need to design a report that displays pictures to get a barcode. (I haven't used barcodes for a few years in crystal reports so my memory is a little rusty!)
0
 
mlmccCommented:
To display a picture, Crystal will need the picture stored in the database or in a file on the system.  It cannot take a picture that is generated by your program unless you store it somewhere.

Crystal can use barcode fonts but not all barcode fonts can be used in Crystal.
 As frodoman asked, what specifically do you need.

Do you ahve a report that is displaying the information?

mlmcc
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
trung85gnAuthor Commented:
I have already shown barcode in a picture box. Problem is I dont know how to display image (barcode) in that picturebox in a CrystalReport. CrystalReport will display amount of images when user choose records print.
0
 
frodomanCommented:
You can't do that.  You need to either store the image of the barcode in your database as an image file or you need to use a barcode font to generate the barcode in Crystal.  You aren't going to be able to accomplish what you're trying to do.

frodoman
0
 
JeffvClaytonCommented:
As mimcc says you have to store\save the picture you want to use in a folder on the computer. You can then Insert the picture file into your CrystalReport. You must choose to link the picture file and not embed it using Insert OLE object menu option, so that when you update the picture file on your computer e.g. MyPic.bmp by saving a new BarCode image to MyMyPic.bmp,  the picture in the report changes as it is only a link to whatever your image file presently contains.

You now have 3 options

Use a BarCode Font
Link an OLE Object (inmage file)
Put your images ina database
0
 
trung85gnAuthor Commented:
Thanks !

I think I'll put my images in a database, may be "barcode" field (type : image) )of Product table. But when my database has a large amount of images (10000 or more), my database  become too large.

How can I solute that problem ?
0
 
frodomanCommented:
You can better handle this by putting the characters you need in your product table and use a barcode font to render the barcode on the report.

If you must use the prerendered inamges, then your database will have to expand to accomodate this.

frodoman
0
 
trung85gnAuthor Commented:
How to use a barcode font to generate the barcode in Crystal ?

Thx !
0
 
JeffvClaytonCommented:
You have to install bar code fonts on your computer, its the same as having Arial only it doesn't show letter shapes it shows lines. A bar code is a series of letters, numbers or symbols displayed as lines. You may have seen some barcodes with the English equivalent written underneath the lines.
0
 
JeffvClaytonCommented:
There are many different standards for bar codes, you need to get a font that will work with you bar code readers. The readers will have been set up to work with a certain type of bar code. You may also need to install some extra bar code dll's in to your crystal reports set-up. See help at the crystal reports web site which is
http://www.businessobjects.com/products/reporting/crystalreports/default.asp
0
 
JeffvClaytonCommented:
Bar Code Font ||||
Arial Font        *Hello*


Bar Code reader reads bar code above and sends the string '*Hello*' to your computer

The * denotes the begining and end of the word so your code can know when its got the entire string, what * symbol you use is optional

Typing in the letters *Hello* to microsoft word and then changing the font to a barcode font produces something like ||||||

0
 
JeffvClaytonCommented:
So sending a string to a @StringVariable in a Crystal Report that is formatted as a BarCode Font will produce ||||| and not *Hello*
0
 
idautomationCommented:
You can also create barcodes in Crystal without installing any fonts with the Native Barcode Generator for Crystal Reports. The tutorial is online at:
http://idautomation.com/crystal/native/UserManual.html#Barcode_integration_tutorial
If you still need a font, a free font is available at:
http://www.idautomation.com/fonts/free/
0
 
mlmccCommented:
Check this site for barcode fonts that work with Crystal.  About halfway down the page is a section on barcodes.

http://www.kenhamady.com/bookmarks.html

mlmcc
0
 
trung85gnAuthor Commented:
If I save  barcode image in a temp folder (somewhere in local), then get image's path, so How to display that image by it's path. ?
0
 
JeffvClaytonCommented:
As my previous comment - Select place an OLE Object Link in your report, follow the menu options and browse to your image file, you should then get an outline of a square shape representing your image which you can then place (paste) into an area of your report. The current image will then appear where you have placed it.
0
 
trung85gnAuthor Commented:
Not use Menu options, I meant use code ?? and load multi images
0
 
JeffvClaytonCommented:
Then you have to put your images in a database, and link that your report to the correct field in the dataabse because somewhere along the line there has to be either a field in your report which is the database field with the image or an ole object link. You can't magically add an image with no established/pre-determined field in the report.
0
 
mlmccCommented:
What version of Crystal?

here is an idea that worked in earlier versions
http://support.businessobjects.com/communityCS/FilesAndUpdates/SCR8_VB_RDC_ChangeImages.exe.asp

mlmcc
0
 
trung85gnAuthor Commented:
First , I save image in a temp folder, and get image path (string), then insert to "imagepath" field of this product.

So, when I want to display barcode of this product, I will retrieve imagepath. And how to display image in a CR with that imagepath ??

Thanks !!!  
0
 
mlmccCommented:
From Crystal or an application driving the report?

mlmcc
0
 
trung85gnAuthor Commented:
From an app driving the report !

I have a form that manage products, when I want to print product infomation (include barcode image), I will use this form to call the report which displays product infomation.

thx !
0
 
idautomationCommented:
I know you can stream images into a Crystal Report with an OLE Object. This is how:
http://idautomation.com/crystal/streaming_crystal.html
You  may be able to specify the C: drive instead of the web also.
0
 
ashbinrebelloCommented:
Some Experts telling about the Storing the Images some where in the system (Folder) and can access the image from the folder thru Crystal Report.Can any body help to tell how to do this in Crystal Report.
My reqmnt : I have an HR DataBase and we need to show the Complete personal profile of each employees on  thru Crystal Report.If we are able to do this its great help our Organization to reduce lot of tideous tasks.

Regards
Sabu Varghese-Technical Co-Ordinator-Applications Clipsal ME.UAE
0
 
BarshamDevelopment Team LeadCommented:
You can Create a Class And Add It as Datasource in your crystal report
you just need to create a Byte Array property for your image then when you create an instance of your class and set it as crystal database it will work without any more requirment
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 8
  • 7
  • 4
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now