0

How can I use a ZPL loop in Oracle BI publisher to print the following labels:

order number:1234 line: 1
item: ABC1   
Qty: 10    

order number:1234 line: 2
item: ABC1   
Qty: 10  

order number:1234 line: 3
item: ABC1   
Qty: 10  

Per above example 3 stickers should come/print on the Zebra Printer

Oracle Apps R12.1.3, Bi publisher 5.6.3

Delphi Coder
  • 1,723
  • 1
  • 14
  • 25
Rajesh123
  • 107
  • 1
  • 5
  • 17

1 Answers1

1

We used delimiter based eText BI publisher templates to do exactly what you are thinking of doing. I've made several of them to print labels.

Look up documentation on making EFT (Electronic Funds Transfer) using BI Publisher eText templates. This answer requires some basic knowledge on etext templates.

You need eText templates so you get raw text output rather than RTF or PDF. The other option is to code it in PLSQL, which would run faster, but combining the data extraction (SQL) and formatting (Into ZPL) into a PLSQL package would require migrating across instances rather than uploading the template from the front-end in your target instance.

The documentation will show you what to do to set the level you want to repeat (loop/for-each). Hard code ZPL you want to remain static like begin/end label, print quantity, etc.. Concatenate that with the changing item details. You'll end up with something like:

'^XA'
'^PQ1,0,0,N^CI0^PW812^MMT^LL406'
'^FT40,1300^A0N,24,24^FH^FN97^FD'||ITEM_NUMBER||'^FS'
'^XZ'
  • Each of those would be its one <NEW RECORD>
  • Your <MAXIMUM LENGTH> would be 400 or something large-ish
  • Your <FORMAT> would be Alpha

Unfortunately since the eText templates are RTF files, and formatting is very important, I can't just put the exact code/formatting/syntax in here. But this can give you a good example:

etext ZPL Example

EdHayes3
  • 1,777
  • 2
  • 16
  • 31
  • Thanks Much @EdHayes3, we have used ZPL code in PLSQL package and sending the output on the Zebra Printer. – Rajesh123 Apr 18 '17 at 08:00
  • Is this correct one what i am thinking ? if not please correct me. 1)Create eText file, source is rdf report tags 2)call this Template in Burst Control? (use printer document) Could you please suggest on the above one is correct? Question: 1) How to use below code in eText file in EBS? '^XA' '^PQ1,0,0,N^CI0^PW812^MMT^LL406' '^FT40,1300^A0N,24,24^FH^FN97^FD'||ITEM_NUMBER||'^FS' '^XZ' can we have sample screen on this if possible? – Rajesh123 Apr 18 '17 at 08:04
  • Could you please send me sample Print Label files/code? sivasurya2k2@gmail.com – Rajesh123 Apr 18 '17 at 08:05
  • The Oracle BI Publisher documentation should give you details on how to make the BI Publisher e-Text templates. We called the concurrent program which generated XML (you can use BI Publisher data definitions for this, or custom PLSQL to generate the XML). When calling the concurrent program, we specified the e-text template as the output format. If you are creating ZPL in PLSQL, and sending to printer, what do you want the BI Publisher stuff for? – EdHayes3 Apr 19 '17 at 20:06
  • Thank you! But in PLSQL to print Labels on the printer i am hard-coding the Zebra Printer in PLSQL code in EBS(Created separate concurrent program for this and calling from rdf report). If i use e-Text , so i can call template in Burst control file. But i don't know how to use ZPL code in e-Text, could you please share me sample/working e-Text for Labels? – Rajesh123 Apr 21 '17 at 09:05
  • 1
    Updated with screen shot. Hope that helps. – EdHayes3 Apr 24 '17 at 20:29
  • Thank you. Can we use like this in e-Text? '^FO20,45^A0N,35^FDOrder Number: '||||'^FS' – Rajesh123 Apr 26 '17 at 14:16
  • '^FO20,45^A0N,35^FDOrder Number: '||ORDER_NUMBER||'^FS' would be the correct syntax. – EdHayes3 Apr 27 '17 at 15:31