Here is the procedure from the Oracle Report, which means it is in PL/SQL.
function CF_SHIPPING_ADVISE_ID_BCFormul return Char is
barcodeData VarChar2(80) := :SC_shipping_advise_ID;
/*name of temp file*/
/*object containing barcode properties*/
/*object that creates jpeg of barcode based on BarcodeObject*/
-- implementation of IDAutomation linearbarcode.jar
imageFile := srw.create_temporary_filename();
/*Create the barcode object*/
BarcodeObject := Barcode.new();
/*Set the symbology*/
/*set the data to encode*/
/* Manually size the image */
/* Set the bar height to 2 cm */
/* Set the small bar width to 12 cm */
/* set IMAGE SIZE directly */
Barcode.setImageSize(BarcodeObject, 189, 80);
/* Suppress Human-Readable */
/*Create the jpeg*/
BarcodeEncoderObject := BarcodeEncoder.new(BarcodeObject, 'JPEG',ImageFile);
/*Create the gif*/
-- BarcodeEncoderObject := BarcodeEncoder.new(BarcodeObject, 'GIF',ImageFile);
/*If, for some reason, the barcode is not created, return null
otherwise, return the name of the barcode image jpeg that was
if ORA_JAVA.IS_NULL(BarcodeEncoderObject) then
The setup is otherwise as prescribed for the report control for display. You can test this with any string that fits the following pattern:
YYYY is a year, eg: 2011
SS is a two-character string, eg: WM
DDDD is a four digit "number" string, eg: 1234
The string I have been testing with is: 2012WM2925, but any and all variations on this theme are potential values for the barcodedata property. Note that this code is currently creating a JPEG image, but I have been testing both JPEG and GIF. There has been no difference in results.
The above procedure will create a barcode, but changing only the width parameter in the call to setImageSize( 190, 80) will cause it to fail to create an image. At least, that is what I assume it fails on since I get an error from the report that this function failed to return a value.
Thanks for your efforts.
Posted 2436 day(s) ago