How to create barcodes in Oracle Reports using the Native JavaScript Barcode Generator.
The tutorial describes how to use IDAutomation's
JavaScript Barcode Generator
to create barcodes in Web Layout Mode for Oracle Reports. Because native JavaScript
is used, no additional components, fonts or plug-ins need to be
installed to create barcodes; the code is complete barcode generator.
This example is based on Oracle Reports Web Layout Mode using
IDAutomation's JavaScript
Barcode Generator to create a Code 128 barcode, and it assumes a basic
knowledge of Oracle Reports. For more information on using the JavaScript
Barcode Generator, please visit:
http://www.idautomation.com/javascript/
- Create a Web report or use Reports Builder Wizard and select either
the “Create both Web and Paper Layout” or “Create Web Layout Only” option.
- Add the following line at the top of the file just before the </head>
line to load the appropriate JavaScript file:
<script language="JavaScript" src="IDAutomation_JavaScriptBarcode_C128.js"></script>
- Place the IDAutomation_JavaScriptBarcode_C128.js. in the folder
that contains the .jsp file.
- Add a script where the barcode is to appear in the HTML document
or text object, which is the file name without the ".js":
<script type="text/javascript">
document.write(IDAutomation_JavaScriptBarcode_C128(DataToEncode))
</script>
- Modify "DataToEncode" with what is to be encoded in the barcode.
This may be accomplished with a "variable" in JavaScript or a dynamically
generated webpage. Additional properties may be modified if necessary.
- To preview the report output in a Web browser, choose Program >>
Run Web Layout. This immediately displays the effect of the changes
on the output.
- The symbology may be changed if necessary according to the
JavaScript Barcode Generator User Manual.

© Copyright 2000-2009 IDAutomation.com, Inc., All Rights
Reserved. Legal
Notices.
|
Over 70% of Fortune 100
companies use IDAutomation's products to automate their businesses.
|
|