Link to home
Start Free TrialLog in
Avatar of vensali
vensaliFlag for India

asked on

Inserting barcode in crystalreports for Asp.net

We are having a Asp.net  website  developed in Visual studio 2010.  we are using crystal reports for report generation.  we need to insert linear  barcode in the report.

We have a solution for a similar requirement in Windows  application developed in vb.net.  we are using .net component  barcode generator to insert the barcode in the crystal reports.

Is there any similar component available for asp.net ( open source component would be better)
OR
is there any better solution
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

wouldn't it be simpler just to use a barcode font?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In my experience, an ASPX script worked best in ASP.NET.
The question is how is the report going to be used / viewed?

IF you're exporting it or printing it . . . you might get away with the font as Eric suggested.  If you want to view / use the report interactively online you may need additional coding via your bar code generator.
If you want to show the report exported (i.e. a PDF generated on-the-fly) I'd recommend the use of a barcode font, too. Simple, easy, convenient.

If the barcode is to be viewed online (i.e. after exporting it as html), you could probably generate the barcode as image prior to the report generation and transfer it to the report as blob (i.e. with a subreport that gets the blob within an ADO.NET dataset).

I've not tried that before, but I presume it's possible to "print text" into an image with on-board means of whateverlanguage.NET, so you could use the barcode font to "print" the code into an image and shove it into the report via dataset.

P.S.: I've just done an internet serach on ".NET print text into image" and got 1E6++ hits. Some write over an existing image (i.e. a photograph) but creating an imge full of white background prior to painting black barcode over it seems not that complicated to me ...