Label Printing from PL/SQL

There are cases where we need to print Labels from PL/SQL Package. It can be achieved through Oracle API. (INV_PRINT_REQUEST.SEND_XML_TCPIP)
API Description
/*
* Method for sending a string to a TCP-IP address. Used to send the
* label-XML file to a print-server. The x_return_msg returns any
* message send back from this TCP-IP address. This function returns
* 0 if the file was send successfully. It returns -1 if there was
* any error.
*/

Usage Example

v_num_return :=
INV_PRINT_REQUEST.SEND_XML_TCPIP (v_chr_ip_address,
TO_CHAR (v_num_port_no),
v_chr_xml_content,
v_chr_ret_msg,
v_chr_print_status);

Limitations :- XML Content cannot exceed 4000 Chars.

Advertisements

Namespace prefix ‘ref’ used but not declared in XML Publisher

Error

Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'ref' used but not declared.
	at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
	at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)

This Error generally due to higher BI Publisher versions.

If Word Properties of the XML Field has source something like ‘<?ref:xdo0040?>’ you will face this error

Solution

Make BI Publisher backward compatible.

 

Go to Options

options

Build -> Form field size  -> Set to Backward Compatible.

backward