trung85gn
asked on
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
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
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!)
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
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
ASKER
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.
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
frodoman
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
You now have 3 options
Use a BarCode Font
Link an OLE Object (inmage file)
Put your images ina database
ASKER
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 ?
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 ?
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
If you must use the prerendered inamges, then your database will have to expand to accomodate this.
frodoman
ASKER
How to use a barcode font to generate the barcode in Crystal ?
Thx !
Thx !
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.
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
http://www.businessobjects.com/products/reporting/crystalreports/default.asp
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 ||||||
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 ||||||
So sending a string to a @StringVariable in a Crystal Report that is formatted as a BarCode Font will produce ||||| and not *Hello*
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/
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/
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
http://www.kenhamady.com/bookmarks.html
mlmcc
ASKER
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. ?
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.
ASKER
Not use Menu options, I meant use code ?? and load multi images
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.
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
here is an idea that worked in earlier versions
http://support.businessobjects.com/communityCS/FilesAndUpdates/SCR8_VB_RDC_ChangeImages.exe.asp
mlmcc
ASKER
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 !!!
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 !!!
From Crystal or an application driving the report?
mlmcc
mlmcc
ASKER
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 !
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 !
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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
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
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
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
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