University of Colorado Colorado Springs banner
Login to LibApps.

Print Templates Archive: Holdshelf Slip

Getting Started

Objective of this Example

  • Set the system to use print templates for holdshelf slip wrapper to be sent to a receipt print
  • Export the default holdshelf slip wrapper out of the system
  • Edit the template with Jasper iReport
  • Import the template into the system
  • Test template output

 Our Environment

  • Window7 Enterprise SP1 x64
  • Millennium 2011 R1.3 & Sierra 1.1.3_4
  • Jasper iReport 4.0.2
  • Epson TM-T88V receipt thermal printer
    Thermal roll paper dimensions: 3 1/8" x 230'

 Important Things to Know About Printing Holdshelf Slip Wrappers with Receipt Printer

  • The Epson thermal printer driver must be installed correctly
  • Local Printer Settings

Format = Text(narrow)

Text Printing

  • Characters per line: 40
  • Lines per page: 60
  • Lines to eject: 0 (this is subjective)
  • The hold slip based on the print template will print. Note that print templates will only print from logins that are enabled to use them, so it is possible for some logins to continue using Innovative-created custom hold slips while others use hold slips based on print templates.

Exporting

To export the template to your computer...

1)  Highlight the template that you want to export and click Export.

 

2)  Select the location where you wish to export the template, confirm that directory (folder) path is correct within the File Name: field, then select Choose Directry.

 

 

**HINT: You may want to create a directory within C:\Millennium called 'Print Templates' to store all exported templates**

 

Things to keep in mind...

  • Format of the files is jrxml (Jasper Report XML)
  • If you have files in the directory you are exporting to, you can't see them in the Choose a directory window
  • If you have a file with the same name as the one you are exporting, it will be overwritten (without warning)
  • Do not enter a file name.  The system will automatically name these exports
  • Graphic files used in templates are stored separately, and are exported automatically

 

Repeat the above process if you want to export other templates, and then select OK  to close the Settings window

 

Editing

The default template, _WrapSlip, is for printing a slip that is intended to "wrap around" the item while it's on the hold shelf.

 

This example will illustrate how to use a receipt printer to print these wrapper slips.

 

Dimensions:

  • Thermal roll paper dimensions: 3 1/8" x 230'

 

**NOTE: Measurements in iReport are in "points" not inches. It may be useful to find a measurement conversion tool online. Here is an example of one: http://www.thecalculatorsite.com/conversions/length/points-to-inches.php **

 

1)  Navigate to the directory where the default template was exported during the export Print Template process and open file with Jasper iReport.

 

**NOTE:  2 files came with this export.  A graphics file that is used in the default template is automatically downloaded**

 

 

2)  Immediately save the file with a different name

 

 

**NOTE: It is beneficial to save these files with some kind of version control naming convention, That way if something goes wrong you can easily go back to a version that worked before a change.

** For example: HSWv0x0.jrxml  - stands for Holdshelf Slip Wrapper version 0.0 **

 

 

 3)  Look at the default Print Template data fields and make a list for the changes to be made.

 

iReport Preview (**NOTE: you do not see the data fields in preview**)

 

 

 Changes to "WrapSlip.jrxml"

  • Change page size for printing to receipt printer
  • Remove image
  • Remove "Hold Slip" shaded area
  • Remove "Hold Slip" static text
  • Remove Title band
  • Increase all font sizes
  • Make pull date bold
  • Make patrons first and last name uppercase
  • Only print first 4 characters of first name
  • Add end of template marker

 Steps to make the changes...

1)  To resized the template 's page size to match receipt printer stock.

a. Select WrapSlip within the Report Inspector

b. Right-click on WrapSlip and choose Properties to bring up the WrapSlip Properties window.

 

 c. Change Page Width: 225

d. Change Page Height:900

 

 2)  To remove a graphic/static field select it and delete it. The deletion can be done either with the delete key, or right-click then select delete.

a. Delete logo graphic

b. Delete "Hold Slip" shaded area

c. Delete Hold Slip static text field

The template should now look like the following:

 

3)  To make the  "Title" band height = 0, select Title within the Report Inspector.  Then find the Title-Properties pane.

**NOTE: (Ctrl + Shift + 7) is a shortcut key for the element Properties pane**

 a. Locate Band height within the Title-Properties Pane and set value to 0

 

 

The template should now look like the following:

 

 4)  Move and Center the following text fields over to the Detail1 section. To move the text fields on the pocket, left-click on the data field and drag it into the desired position

**NOTE: guide lines will appear that will help with aligning the field with other elements within the template.**

 

 5)  To increase font size for patron's record number

a. Select {precid} (text field) under Detail1  within Report Inspector.

 

b. Then open its Properties Pane and locate Text properties

c. Change  size to the value 22

 

 6)  Follow the same steps as in the previous step to Increase font size for the following items

a. Item's barcode number {v_i_barcode} to the value 22

b. Item's hold expiration date {pull_date} to the value 28

c. Patron's lastname {wrapper_last_name} to the value 30

d. Patron's first name {wrapper_first_name} to the value 30

**Note:  The expiration date (day, month, and year) of the item hold.**

**The format is specified by your library's settings for the display of dates. **

 

The template should now look like the following:

 

**NOTE:  The text fields will now have to be manipulated so that the text within the fields display; this is iReports way of showing the fields are too small for the size of the font**

 

7)  To resize the text fields

a. Select the field and sizing handles will appear

 

b. Left-click on a handle and drag it out to make it bigger

 

**NOTE: There will adjustments needed such as repositioning after resizing each of the text fields**

 

After adjusting all the fields the template should look similar to this:

 

8)  To make the Pull Date bold,  Select {pull_date} (text field) under Detail1  within Report Inspector.

a. Then open its Properties Pane and locate Text properties

b. Check the box for Bold

 

 9)  To make the patron's last name uppercase, add the following java expression into the {wrapper_last_name} text field

a. Select {wrapper_last_name} (text field) under Detail1  within Report Inspector. Then right-click on {wrapper_last_name} and choose Edit expression. This will bring up the Expression Editor

 

 c. Remove the existing java expression, and paste in the following. Then choose Apply

$F{wrapper_last_name}.toUpperCase() != null ? $F{wrapper_last_name}.toUpperCase() : ""

 

 10)  To only print the first 4 characters for patron's first name and uppercase, add the following java expression into
the {wrapper_first_name) text field.

a. Select the {wrapper_first_name} (text field) under Detail1  within Report Inspector.

b. Then right-click on {wrapper_first_name} and choose Edit expression. This will bring up the Expression Editor

c. Remove the existing java expression, and paste in the following. Then choose Apply

$F{wrapper_first_name} != null ? ($F{wrapper_first_name}.length()< 4 ? $F{wrapper_first_name}.toUpperCase() : $F{wrapper_first_name}.toUpperCase().substring(1,5)) : ""

 

11. To add an end of template marker, Open the Palette

**NOTE: (Ctrl + Shift + 8) is a shortcut key for the Palette pane**

 a. Drag the Static Text object to the bottom of the Detail1 section

b. Double-click on the Static Text field and type in a few underline characters

 

 12)  Save the template.  The editing for this template is done.

 

 

Importing to Millennium

To Import the customized template into Millennium...

1)  Select Settings from the Admin menu.

2)  Click on the Print Templates tab.

3)  Select  Holdshelf Slip from Output Type drop-down menu.

4)  Verify that Use Print Templates is checked.

5)  Select Import.

 

 

6)  Navigate to the directory where the custom template was stored.

7)  Select the custom template file and choose to Open.

 

8)  A Print Template Name/Description window will appear.  Fill in the fields with appropriate information and choose OK.

 

 

9)  Select the custom template that was just imported and choose the arrow pointing to Preferred Templates to move it over.

 

 

10)  Select the custom template again and choose Preview.

 

A Preview Window will now appear.  This is a good way to test that Millennium can open the template.

**NOTE: you do not see any injected data fields in preview**

 

 

 

10)  Close the Preview Window and choose Save Settings. Then OK.

 

 

 

Importing to Sierra

To Import the customized template into Millennium...

1)  Select Settings from the Admin menu.

2)  Click on the Print Templates tab.

3)  Select  Holdshelf Slip from Output Type drop-down menu.

4)  Verify that Use Print Templates is checked.

5)  Select Import.

 

6)  Navigate to the directory where the custom template was stored.

7)  Select the custom template file and choose to Open.

 

8)  A Print Template Name/Description window will appear.  Fill in the fields with appropriate information and choose OK.

 

9)  Select the custom template that was just imported and choose the arrow pointing to Preferred Templates to move it over.

 

10)  Select the custom template again and choose Preview.

 

A Preview Window will now appear.  This is a good way to test that Millennium can open the template.

**NOTE: you do not see any injected data fields in preview**

 

10)  Close the Preview Window and choose Save Settings. Then OK.

 

Testing

The only way to test this template is to do a live test.

1)  Place some items on hold through Millennium.

2)  Check to items back into Millennium.

3)  When prompted to print Hold Slip choose to do so.

4)  Select the receipt printer and Print. At this point the Holdshelf Slip Wrapper will be sent to the receipt printer.  Make sure it printed the way thay was intended.

**NOTE:  Develop the template with an account not used by others.  This enables you to test the templates without interfering with normal workflows.  After sufficient testing, then make template available for other Millennium logins.**

 

Sample of the generated Hold Shelf Wrapper Slip...