First, I’d like to describe my current situation.
I have an RDLC whose data is taken from a dataset “ds” using Stored Procedure “sp”. Lets say that from “ds” I can get a field of type String called “bar_code”, and in turn can be used in a placeholder combined with a 3of9 font to generate the barcode.
Now, I’d like to obtain the same result, but using another method which, given a string, will return an image of barcode in BMP or JPEG format. This method is already described at http://www.techrepublic.com/blog/howdoi/how-do-i-generate-barcodes-using-c/173.
My question : is it possible to write the method in the ReportViewer code behind (.aspx.cs) ?
If it is possible, how can I pass that “bar_code” into this method and then embed the result (the JPEG or BMP) into the RDLC ?
That article you refer to has info about how to generate the barcode from an aspx.
One tiny part is missing: you use that “BarcodeGenerator.aspx?data=11111111” link as the ‘src’ of an
<img>node in your html.By the way: “gif” is better than “jpg” in this case: jpg can cause unwanted artifacts, making the barcode difficult to scan. “bmp” is usually too big.