March 2010
Print Barcodes with the Client Report Option
The SEQUEL Client Report Option (CRO) lets you design reports for PC printer output using System i data. There’s no need to download data to a PC-based product to create nicely formatted reports. You can specify fonts, colors, pictures, and other formatting capabilities, such as shading, borders, and conditional highlighting using the CRO, right on the System i!
This month, we’ll take a look at how to create and include a barcode in a CRO report. These instructions assume you have the Client Report Option installed. Here are the steps:
1. Install a barcode font on your workstation. Barcode fonts are not typically installed with Windows, so you’ll have to acquire and install one yourself. You can find a number of standard barcode fonts—many of them freeware—through an Internet search. Check with your IT department if you need help with this step.
2. Create a SEQUEL view to extract the information you want to print. In our example, we use the concatenation (CAT) function to create a barcode field (called BARCODE) from a number of different fields and literals. BARCODE is composed of a product class field (CLASS) and a product number field (PRODUCT) separated by a hyphen. These values need to be enclosed between two asterisks—a common barcode convention. The full CAT statement is below: SELECT CAT("*",CLASS,"-",PRODUCT,"*") NAME(BARCODE) len(22)
3. After you’ve designed your SEQUEL view, save it, then select File > New > SEQUEL Client Report from one of the ViewPoint menus to start the Client Report design session.
4. If you choose to use the new Report Wizard, make sure your BARCODE field is included in the list of fields to add to the report. If you prefer to lay out the fields by hand, simply drag-and-drop the BARCODE field to your client report layout.
5. Right-click the BARCODE field and select the Format option from the drop-down menu.
.jpg)
6. In the Format Editor, select the Font tab and then select the bar code font which was installed previously. You may also want to specify a larger font size, if available. (Some bar code fonts are only available in one point size.) Click OK to save your choices.
.jpg)
7. Click Preview Results to verify that you sized the barcode field so that the entire barcode appears.
.jpg)
If you made the field too small on the report layout, the barcode may be cropped horizontally or vertically (like the first barcode image, below). If you sized the barcode field properly, the barcode won’t be cropped and will look more like the second image.
![]()
.jpg)
8. If you need to resize the barcode field so that the entire barcode will print on the report, return to the report design layout and drag one of the field’s corner placeholders to enlarge the field as shown below.
.jpg)
That’s all there is to it! If you’re looking for a quicker and easier way to create nicely formatted reports for PC printer output, try the SEQUEL Client Report Option.
By Steven Smith, Technical Consultant ViewPoint's
ViewPoint's Many Common PC Formats
SEQUEL users everywhere want to download System i data in PC file formats. SEQUEL ViewPoint is a great tool for doing this. Use it to reformat, summarize, and convert database information into any of the following file formats (arranged by SEQUEL object type):
| SEQUEL Views/Tables |
SEQUEL Reports |
Client Reports | Client Tables |
| Text (.txt) | HTML (.htm) | HTML (.htm) | MS-Excel (.xls) |
| Text - tab delimited (.txt) | Adobe PDF (.pdf) | Adobe PDF (.pdf) | HTML (.htm) |
| dBase (.dbf) | Rich Text (.rtf) | Rich Text (.rtf) | |
| MS-Excel (.xls) | Text (.txt) | Text (.txt) | |
| Lotus (.wks) | |||
| XML (3 varieties) | |||
| CSV (.csv) | |||
| User-defined |
You are rarely more than a mouse click away from being able to complete a download when you’re working with SEQUEL ViewPoint. Here are several ways you can download System i data in PC formats:
- Create a desktop icon that automatically downloads data.
- Right-click a SEQUEL object from within ViewPoint Explorer and select the Create PC File option.
- Use the File > Save Results As > PC File option on any ViewPoint menu.
- Click the Save Results as PC File icon on the toolbar when you are in Design mode.
- Select the E-mail option and specify the file attachment type.
- Create a PC file from within a SEQUEL script, CL program, or job scheduler.
Q&A
I need to create a work file before I display a client report in ViewPoint. How do I do this?
You need to create a very simple two-line script. For the first line, use the EXECUTE command to create your work file. For the second line, use the REPORT command to display the report in ViewPoint. You do not need VPSHELL or RUNRMTCMD.
Need Help?Talk to UsIn the U.S. and Canada, call 1-800-328-1000 and ask for Sales. Elsewhere in the world, contact your local international office. |



