University of Colorado Colorado Springs banner
Login to LibApps.

Print Templates 102: Examples

Advanced Customization Examples

Under this tab you'll find various examples of Print Templates we've created, including

  • Combined Spine & Pocket Labels (iReport/Millennium)
  • Holdshelf Slip (Jaspersoft Studio/Sierra)
  • Hold Pick-up Notices (iReport/Millennium)
  • Overdue Notices (iReport/Millennium)
  • Hold Cancelation Notices (iReport/Millennium)

Objective of this Example

  • Set the system to use print templates for spine labels output
  • Export the default spine label template 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
  • HP Laserjet 2430
  • Gaylord SLB label (47-281)

Dimensions:
Spine Label: 1 5/8H x 7/8"W
Circulation Label: 1 5/8H x 2 7/8"W
Sheet: 8 1/2 x 11"

 

Important things to Know About Printing Spine Labels with Print Templates

  • A graphics-capable local printer is required for print templates
  • Print templates print an "image", not text
  • Old tractor fed printers usually won't work (not graphics capable)
  • Printing can be immediate or labels can be queued
  • Monographic label queues are only saved for the duration of a session
  • Logging out of Millennium/Sierra will warn that the queues will be emptied

 

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 the directory (folder) path is correct within the File Name: field, then select Choose Directory.

 

***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

Back to Top

Getting Started

The default template,  _47821Gyld, is for printing a combined spine/pocket label on an 8.5 x 11 sheet labels.

 

Dimensions:

  • Spine Label: 1 5/8H x 7/8"W
  • Circulation Label: 1 5/8H x 2 7/8"W
  • Sheet: 8 1/2 x 11"

 

***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 ***

** NOTE: This example only shows how to work with the LC call number format. ***

 

Example that shows the anatomy of a LC call number:

This image is from InnoU Online Course: Customizing Print Templates: Spine labels

 

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

 

 

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: SPLv0x0.jrxml  - stands for Spine Pocket Label 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 "47281GYLD.jrxml"

  • Modify so decimals for cutters show on spine and pocket

***NOTE: The field elements callSuba, callEndCR, callSubb, and callSubbCR all drop the decimal point (Millennium Reference page 107534).***

  • Remove Library name
  • Move Author field after Call# and before Title on Pocket
  • Move all fields so everything starts on top of label and is left justified
  • Include more title subfields
  • Remove item's barcode

 

Editing
1) To remove a text field select it and delete it. The deletion can be done either with the delete key, or right-click then select delete.

  • Delete Library name - 'acctname'
  • Delete Items barcode - 'itemb'

 

The template should now look like the following:


2) 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.***
 

3) Reorder the following fields from top to bottom, and left-justified them.

  • Call# - 'callAlphaStart...'
  • Author - 'biba'
  • Title - 'bibt'

The template should now look like the following:


 

4) To add conditional statement to show decimals for cutters on spine label, left-click on the text field to select it. Then right-click on the text field, and select edit expression.

 

a. The Expression editor will now appear. Select the whole text line and delete.

 

b. Paste the following java expression code into the box. Be careful when copying and pasting! You may want to paste the expression first into a simple text editor. Then do some cleanup  and paste it into iReport

$F{callAlphaStart}.trim() +
($F{callAlphaStart}.equals("") ? "" : "\n") +
$F{callNumericStart} + $F{callNumericAfterDec} +
(($F{callNumericStart} + $F{callNumericAfterDec}).equals("") ? "" : "\n") +
($F{callSuba}.matches("(?s)[A-Z].*") ? "." : "") +
($F{callSuba}.matches("[0-9a-zA-Z]*\\.[A-Z].*") ? ($F{callSuba}.substring(0,$F{callSuba}.indexOf(".")) + "\n" +
$F{callSuba}.substring($F{callSuba}.indexOf("."),$F{callSuba}.length())) : $F{callSuba}).trim().replaceAll("\\s","\n") +
($F{callSuba}.equals("") ? "" : "\n") +
($F{callSubb}.matches("(?s)[A-Z].*") ? ($F{callSuba}.matches("(?s)[A-Z].*") ? ($F{callSuba}.matches(".* .*") ? "." : "") : ($F{callSuba}.matches(".*\\..*") ? "" : ".")) : "") +
$F{callSubb}.trim().replaceAll("\\s","\n").replaceAll("\\.\\s",".").replaceAll(",\\s","\n").replaceAll("\\smaj\\."," maj.\n").replaceAll("\\smin\\."," min.\n") +
($F{callSubb}.equals("") ? "" : "\n") +
$F{itemv}.trim().replaceAll("[ :]","\n").replaceAll("\\.\\s",".").replaceAll(",\\s","\n")

 

***NOTE: This java expression was developed by Steve McDonald, Tufts University. This can be found on the CSDirect Wiki: http://csdirect.iii.com/lswiki/PrintTemplates/SpineLabelTips#Formatting_Library_of_Congress_c***
 

***A complete description on how this code works can be found at: http://csdirect.iii.com/lswiki/PrintTemplates/LCCallNumberScript***

The Expression editor should now look like the following:

c. Select Ok to save your changes and close the Expression Editor.

d. Now add the conditional statement to show decimals for cutters on pocket label. Follow the same procedure that was used above for modifying the Call# on the spine using the Expression Editor.

e. Paste the following java expression code into the pocket text field for Call#:

$F{callAlphaStart}.trim() +
($F{callAlphaStart}.equals("") ? "" : " ") +
$F{callNumericStart} + $F{callNumericAfterDec} +
(($F{callNumericStart} + $F{callNumericAfterDec}).equals("") ? "" : " ") +
($F{callSuba}.matches("(?s)[A-Z].*") ? "." : "") +
($F{callSuba}.matches("[0-9a-zA-Z]*\\.[A-Z].*") ? ($F{callSuba}.substring(0,$F{callSuba}.indexOf(".")) + " " +
$F{callSuba}.substring($F{callSuba}.indexOf("."),$F{callSuba}.length())) : $F{callSuba}).trim().replaceAll("\\s"," ") +
($F{callSuba}.equals("") ? "" : " ") +
($F{callSubb}.matches("(?s)[A-Z].*") ? ($F{callSuba}.matches("(?s)[A-Z].*") ? ($F{callSuba}.matches(".* .*") ? "." : "") : ($F{callSuba}.matches(".*\\..*") ? "" : ".")) : "") +
$F{callSubb}.trim().replaceAll("\\s"," ").replaceAll("\\.\\s",".").replaceAll(",\\s"," ").replaceAll("\\smaj\\."," maj.\n").replaceAll("\\smin\\."," min.\n") +
($F{callSubb}.equals("") ? "" : " ") +
$F{itemv}.trim().replaceAll("[ :]"," ").replaceAll("\\.\\s",".").replaceAll(",\\s"," ")


***NOTE: The same java expression as the spine, but need to have spaces instead of new line***

 

The template should now look like the following:


5) Now add the java expression to show the b subfields from the 245 or 200.


a. Follow the same procedure that was used above for modifying the Call# on the spine using the Expression Editor.

b. Paste the following java expression code into the pocket text field for Title

($F{bibt}.trim() + " ") + ($F{bib245b}.trim() + " ")


6) Save the template. The desired editing has been completed.

Back to Top

Importing

1) Select Settings from the Admin menu.

2) Select the Print Templates Tab.

3) Select  Spine Label 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***


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

Back to Top

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 Jaspersoft Studio
  • Import the template into the system
  • Test template output

 

Our Environment

  • Window7 Enterprise SP1 x64
  • Sierra 1.2.2_6
  • Jaspersoft Studio 6.0.0
  • 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

  1. The Epson thermal printer driver must be installed correctly
  2. Local Printer Settings
    • Format = Text(narrow)
    • Text Printing
      • Characters per line: 40
      • Lines per page: 60
      • Lines to eject: 0 (this is subjective)
  3. 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.

Back to Top

Exporting the Template

The first step in creating a custom template involves exporting the default template from your system. Remember that print templates have to be enabled in your ILS and the person who will be editing the template has to have the appropriate permissions to begin the process of customizing a default template.

In the example found below you'll see screen shots from Sierra. The steps involved in exporting default templates in Millennium are exactly the same.

1) Start by logging into Sierra. Then choose the Settings option from under the Admin menu.

 

2) Select the Print Templates tab, and select the Output Type (template type) you wish to modify from the drop-down menu.

 

3) Check the box for Use Print Templates. Next, click on the default template (default templates start with the underscore), then click on Export.

 

4) A Choose a directory (folder) window will appear. Browse to find the desired directory where you want to save the default template, and then click on the Choose a directory button.

***Hint: Make a folder within your ILS directory called "Print Templates." Then make subdirectories that have names pertaining to the type of templates. For example: "C:\Sierra\Print Templates\HoldPickup"***

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

Back to Top

Customization

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.

 

1) Open the file in Jaspersoft Studio and immediately re-save it using your desired naming convention.

 

2) Preview the default template and make a list of the changes you plan to make ot it. Here we will...

 

Changing Page Size

To resize the template page size to match receipt printer stock...

1) In the Outline View panel click on Wrap Slip, which should open the Properties panel. Click on the Advanced tab, and under the Report Page menu and make the following changes...

  • Page Width: 225
  • Page Height: 900

***NOTE: Measurements in Jaspersoft Studio 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 ***

 

Your template will now look like this:

 

Deleting Fields

Next delete the fields you want to remove from the template.

1) The easiest way to delete these fields is to click on them and then hit the delete key on your keyboard. Here we are deleting the...

  • Logo graphic
  • The Hold Slip shaded area
  • The hold Slip static text field

 

Your template should now look like this:

 

Removing the Title Band

Remember that it's never a good idea to delete a band from a template. If you will nt be using a band it's best to "remove" the band by making its height zero. To do this...

1) Click on the band name in the Outline View panel; this should open the Properties menu for that band. Click on the Advanced tab, and change the Value of the band Height to 0.

 

The template should now look like the following:


4) Move and Center the following text fields over to the Detail 1 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.***

 

Increasing Font Size
1) Click on the Patron Record Field and then open the Properties panel. Click on the Field tab, and under the Font menu select a font size of 22.


2) Repeat these steps to change the size of the following fields:

  • Item's barcode number {v_i_barcode} to the value 22
  • Item's hold expiration date {pull_date} to the value 28
  • Patron's lastname {wrapper_last_name} to the value 30
  • Patron's first name {wrapper_first_name} to the value 30

 

3) All of these text fields will need to be resized so that the text within the fields display. You will also need to reposition each field after resizing so they are not overlapping. After resizing and repositioning all of the fields the template should look similar to this:

Bolding the Pull Date

1) To make the Pull Date bold click on this field and then open the Properties panel. Click on the Field tab, and under the Font click on the option for Bold.

 

Applying Uppercase
1) To make the patron's last name uppercase, click on the {wrapper_last_name} (text field). Open the Properties panel and click on the field name. Click on the box located next to the Expression box to open the Expression Editor.


2) Remove the existing java expression, and paste in the following one. Then click on Finish to save your chances.

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


Character Manipulation

We only want to print the first four letters of the patron's first name, and for consistency of appearance we want these letters to print in uppercase. To achieve this...

1) Click on the {wrapper_first_name} (text field). Open the Properties panel and click on the field name. Click on the box located next to the Expression box to open the Expression Editor.


 

2) Remove the existing java expression, and paste in the following one. Then click on Finish to save your changes.
$F{wrapper_first_name} != null ? ($F{wrapper_first_name}.length()< 4 ? $F{wrapper_first_name}.toUpperCase() : $F{wrapper_first_name}.toUpperCase().substring(1,5)) : ""

 

Adding an End of Template Marker
1). To add an end of template marker, open the Palette. Drag and drop a Line element to the bottom of the Detail 1 section. Resize and reposition the line so that it sits under the Patron First Name field. If you wish, you can change the line color, size, and type in the Properties panel. Your template should now loo like this:

Back to Top

Objective of this Example

  • Set Millennium to use print templates for overdue notice output
  • Export the default overdue notice template out of Millennium
  • Edit the template with iReport
  • Import the template into Millennium
  • Test template output

 

Our Environment

  • Window7 Enterprise SP1 x64
  • Millennium 2011 R1.3
  • iReport 4.0.2
  • HP Laserjet 8000 series (network)

 

Important Things to Know About Printing Overdue Notices with Print Templates

  • Notices can be sent by email, or printed
  • It may be beneficial to develop separate templates for email and print
  • Notice elements should not overlap each other
  • The name displays on circulation notices as "Last name, First name"
  • Images within an template to be email must be stored on an accessible web server
  • Only .gif and .jpg image formats can be imported into custom templates

Back to Top

Export Default Overdue Print Template (_Overdue)

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.

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

  • Navigate to the desire export directory location
  • Confirm that directory path is correct with in the File Name: field
  • Select Choose Directory

 

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.

Back to Top

Edit the exported default overdue Print Template (_Overdue)


The default template, _Overdue, is for email or printing notices on an 8.5" x 11: stock.

***NOTE: Measurements in iReprt are in "points" not inches. It may be useful to find a measurement conversion tool online, e.g. 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 (.jrxml).

***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.  File | Save as

***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: ODNv0x0.jrxml  - stands for OverDue Notice version 0.0***

 

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

 

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

 

 Here are the changes we'll be making to "Overdue.jrxml"

  • Change image to our library logo
  • Remove the following:
    • "Overdue Notice" shaded area
    • Date Stamp
    • Library Address block
    • Patron Address block
    • Item Record Number
    • Call Number
    • Barcode
    • Notice Text Number
    • Print Sequence Number
  • Add the following:
  • Heading that emphasizes Overdue Notice - "Your Library Item(s) Are Overdue!"
  • Custom greeting - "Hello <patronFirstName> <patronLastName>
  • Add "Date Checked Out:"
  • Emphasize the following field names:
    • Author
    • Title
    • Date Checked Out
  • Emphasize the "Due Date: " field data
  • Best practice to make one template for email and other for print

Changing the Page Height

1) To resized the template 's page size, height, and margins (email)

a. Select Overdue within the Report Inspector

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

c. Change Page Height:648

d. Change all margins to 10

 ***NOTE: This was done for email template only***

***NOTE: The default page size, height, and margins used for  print***

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

a. Delete "Overdue Notice" shaded area - 'staticText-11'

b. Delete Overdue static text - 'Overdue Notice'

c. Delete Date Stamp - 'new.jave.util.D...'

d. Delete Library Address block - 'Library_Addr...'

e. Delete Patron Address block - 'Patron_Addr...'

f. Delete Item Record Number - 'ITEM #' and 'Item_ID'

g. Delete Barcode - 'BARCODE' and 'Item_Barcode'

h. Delete Location - 'LOCATION' and 'Item_Location'

i. Delete Call Number - 'CALL#' and 'Item_Call_Num...'

j. Delete Notice Text Number - 'Notice Text..' and 'Text_Number'

k. Delete Print Sequence Number - 'Print Sequ...' and 'Print_Sequ...'

 

 

Your templates should now look similar to this...

 

3) To make the "Page Header" and "Page Footer"  band height smaller (12points to 8points), select Page Header
within the Report Inspector.  Then find the Page Header-Properties pane.

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

a. Locate Band height within the Page Header-Properties pane and set value to 8

 

b. Repeat the above step, but do the same for Page Footer.

 

4)  To make the "Last Page Footer"  band height equal to zero, select Last Page Footer within the Report Inspector. The find the Last Page Footer-Propertis pane.

a. Locate Band height within the Last Page Footer-Properties pane and set value to 0

Your template should now look similar to this:

5)  Delete the default logo "columns.gif"

6)  To add library image logo, Open the Palette

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

a. Drag the Image object to the top of the Title band section

 

b. A Select an image file.. window will appear.  Select Cancel

 

Since this is a template for email. The URL for the image must be used.  This will create a place holder for the image. In the following steps we will use that URL path.

 

c. Select the image and drag it into position (top and left-justified)

 d. Need to change Image Expression within Image Properties so that the URL is used

i. Select the box to the right of Image Expression

 

ii. The Image Expression editor will appear.

  • This template is going to be used for email. Therefore the path to web server where theImage is hosted needs to be used. Type in the path for the image, then select Ok to apply.

http://www.uccs.edu/images/libiii/UCCS-KLF.gif

***NOTE: Email template needs to have images stored on accessible web server***

 iii. To change the image properties, select the image element under the Title band within the Report Inspector. The find the image-Properties pane.

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

iv. Change image Width: 300

v. Change image Height: 34


***NOTE: To avoid unwanted stretching of the image, make the image properties similar in size***

 vi. Need to enable Is Lazy within the image-Properties pane


 

***NOTE: The "Is Lazy" option only needs to be applied to email template images***

 

Your template should now look similar to this:

 

7)  To add a heading that emphasizes Overdue Notice - "Your Library Item(s) Are Overdue!",  Open the Palette

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

a. Drag the Static Text object under the image within the Title band section, and align the object so it's left-justified

 

 

b. Double-click on the Static Text field and type in the desired heading, "Your Library Item(s) Are Overdue!".

c. Need to change the static text properties, so it stands out.

i. select the static text element under the Title band within the Report Inspector. Then find the Static text-properties pane.

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

ii. Change Properties Forecolor

iii. Change Text properties | Size to 22

iv. Change Text properties to be bold


 

d. To resize the static text fields to accommodate the new font size

e. Select the field and sizing handles will appear

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


 

8) Add the custom greeting to the {Patron_Name_C} text field

        a. To add the Custom Greeting java express with conditional statement, left-click on the text field to select it.The    right-click on the text field, and select edit expression.

b. Overwrite the existing java expression with the following:

 

"Hello" + ($F{Patron_Name} != null ? $F{Patron_Name}. indexOf(',')>0 ? $F{Patron_Name}. indexOf(' ')>0 ?" " + $F{Patron_Name}.substring($F{Patron_Name}.indexOf(' ')+1)  + " " + $F{Patron_Name}.substring(0,$F{Patron_Name}.indexOf(',')) :" " + $F{Patron_Name}.substring($F{Patron_Name}.indexOf(',')+1)  + " " + $F{Patron_Name}.substring(0,$F{Patron_Name}.indexOf(',')) : $F{Patron_Name} : "") + ","

 

Patron_Name field is in following format "patronLastName, patronFirstName"

 

This java expression will change it to "Hello patronFirstName patronLastname,"

 

Then select Apply


 

c. Again resize the text field so it displays properly


Back to Top

Objective of This Example

  • Set Millennium to use print templates for hold cancelation notice output
  • Export the default hold cancelation notice template out of Millennium
  • Edit the template with Jasper iReport
  • Import the template into Millennium
  • Test template output

 

Our Environment

  • Window7 Enterprise SP1 x64
  • Millennium 2011 R1.3
  • Jasper iReport 4.0.2
  • HP Laserjet 8000 series (network)

 

Important things to Know About Printing Hold Cancelation Notices with Print Templates

  • Notices can be sent by email, or printed
  • It may be beneficial to develop separate templates for email and print
  • Notice elements should not overlap each other
  • The name displays on circulation notices as "Last name, First name"
  • Images within an template to be email must be stored on an accessible web server
  • Only .gif and .jpg image formats can be imported into custom templates

Back to Top

Export default Hold Pickup Notices Print Template (_HoldCancel)

Export the template to your PC

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

 

 

 

2) Select the location where you wish to export the template

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

 

  • Navigate to the desire export directory location
  • Confirm that directory path is correct with in the File Name: field
  • Select Choose Directory

 

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

Back to Top

Getting Started

The default template, _HoldCancel, is for email or printing notices on an 8.5" x 11" stock.

 

***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(.jrxml).

***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. File | Save as

***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: HCNv0x0.jrxmlá - stands for Hold Cancellation Notice version 0.0***

 

Back to Top

Customization

Changes to make to this template include:

  • Change image to our library logo
  • Remove the "Hold Cancellation Notice" shaded area, Hold Cancellation text, Date Stamp, Library Address block, Patron Address block, Item Record Number, Author, Barcode, Item Location, Notice Text Number, Print Sequence Number
  • Add the following a Heading that emphasizes Hold Cancellation Notice - "Your Library Item(s) Will Be Reshelved!" and a Custom greeting - "Hello <patronFirstName> <patronLastName>
  • Emphasize the Title and Call Number fields.
  • Insert a line to separate records

***NOTE: It's a best practice to make one template for email and other for print.***

1) Resizing the Template

To resize the template 's page size, height, and margins...

a. Select Hold_Cancel within the Report Inspector

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

 

c. Change Page Height:648

d. Change all margins to 10

***NOTE: This was done for email template only***

***NOTE: The default page size, height, and margins used forá print***

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

a. Delete logo graphic - 'columns.gif'

b. Delete "Hold Cancellation Notice" shaded area - 'staticText-11'

c. Delete "Hold Cancellation Notice" static text field - 'Hold Cancellaton..'

d. Delete Date Stamp - 'new.java.util.D...'

e. Delete Library Address block - 'Library_Addr...'

f. Delete Patron Address block - 'Patron_Addr...'

g. Delete Item Record Number - 'ITEM' and 'Item_ID'

h. Delete Author - 'AUTHOR' and 'Item_Author'

i. Delete Barcode - 'BARCODE' and 'Item_Barcode'

j. Delete Pickup Location - 'LOCATION' and 'Item_Location'

k. Delete Notice Text Number - 'Notice Text' and 'Text_Number'

l. Delete Print Sequence Number - 'Print Sequence' and 'Print_Seque..

The template should now look like the following:

 

3) To make the "Page Header" and "Page Footer"á band height smaller (12points to 8points), select Page Header within the Report Inspector. The find the Page Header-Properties pane.

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

a. Locate Band height within the Page Header-Properties pane and set value to 8.

 

b. Repeat the above step, but do the same for Page Footer.

4) To make the "Last Page Footer"á band height equal to zero, select Last Page Footer within the Report Inspector. Then find the Last Page Footer-Properties pane.

a. Locate Band height within the Last Page Footer-Properties pane and set value to 0.

 

The template should now look like the following:

 

5) To add library image logo, Open the Palette

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

a. Drag the Image object to the top of the Title band section.

 

b. A Select an image file.. window will appear. Select Cancel.

Since this is a template for email, the URL for the image must be used. This will create a place holder for the image.

In the following steps we will use that URL path.

c. Select the image and drag it into position (top and left-justified).

 

d. Need to change Image Expression within Image Properties so that the URL is used

i. Select the box to the right of Image Expression.

 

ii. The Image Expression editor will appear.

This template is going to be used for email. Therefore the path to web server where the image is hosted needs to be used. Type in the path for the image. Then Select OK to apply.

http://www.uccs.edu/images/libiii/UCCS-KLF.gif

 

***NOTE: Email template needs to have images stored on accessible web server***

iii. To change the image properties, select the image element under the Title band within the Report Inspector. Then find the image-Properties pane.

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

  • Change image Width: 300
  • Change image Height: 34

***NOTE: To avoid unwanted stretching of the image, make the image properties similar in size***

iv. Need to enable Is Lazy within the image-Properties pane

***NOTE: The "Is Lazy" option only needs to be applied to email template images***

The template should now look like the following:

***NOTE: if the image isn't displaying. Save the template. Close and Reopen***

6) To add a heading that emphasizes Hold Cancellation Notice - "Your Library Item(s) Will Be Returned to Shelf", Open the Palette

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

a. Drag the Static Text object under the image within the Title band section, and align the object so it's left-justified.

 

 

b. Double-click on the Static Text field and type in the desired heading, "Your Library Item(s) Will Be Returned to Shelf".

c. Need to change the static text properties, so it stands out.

i. Select the static text element under the Title band within the Report Inspector, then find the Static Text-Properties pane.

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

ii. Change Properties Forecolor

iii. Change Text properties | Size to 22

iv. Change Text properties to be bold

d. To resize the static text fields to accommodate the new font size

i. Select the field and sizing handles will appear

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

 

7) Add the custom greeting to the {Patron_Name_C} text field

a. To add the Custom Greeting java express with conditional statement, left-click on the text field to select it.The right-click on the text field, and select edit expression.

 

b. Overwrite the existing java expression with the following:

"Hello" + ($F{Patron_Name} != null ? $F{Patron_Name}. indexOf(',')>0 ? $F{Patron_Name}. indexOf(' ')>0 ?" " + $F{Patron_Name}.substring($F{Patron_Name}.indexOf(' ')+1)  + " " + $F{Patron_Name}.substring(0,$F{Patron_Name}.indexOf(',')) :" " + $F{Patron_Name}.substring($F{Patron_Name}.indexOf(',')+1)  + " " + $F{Patron_Name}.substring(0,$F{Patron_Name}.indexOf(',')) : $F{Patron_Name} : "") + ","

Patron_Name field is in following format "patronLastName, patronFirstName"

This java expression will change it to "Hello patronFirstName patronLastname,"

c. Then select Apply

 

d. Open the Properties Pane and change font to 14

e. Again resize the text field so it displays properly

8) Move the remaining items in "Title" band and left justified them

9) Resized "Title" band in order to remove extra space between "Title" and "Page Header" bands (265points to 215points) a. Locate Band height within the Title-Properties Pane and set value to 215

The template should now look like the following:

 

10) Move the TITLE left-justified next to the left margin

a. Select the TITLE static text field and drag it near the top of Detail1 band and aligned on the left margin

i. Change the text to be Title instead of all uppercase and make bold

ii. Change the font size to 14

 

11) Move and change the size of the text field for $F{Item_Title}

a. Select the $F{Item_Title} text field and drag it so its top is aligned with the Title: static text field

b. Make the $F{Item_Title} field large enough to accommodate a two line title

 

c. Open the $F{Item_Title} properties and change font size to 14

d. Change the $F{Item_Title} properties so that "Stretch with overflow" is enabled

***NOTE: This will accommodate 2 line title and the field is larger so it won't overlap the call# below***

12) Move the CALL # to be left-justified next to the left margin

a. Select the CALL # static text field and drag it under the Title static text field

i. Change the text to be Call #: instead of all uppercase and make bold

ii. Change the font size to 14

12) Move the $F{Item_Call_Number}

a. Aligned it to be next to Call# static text field and below Title text field

b. Change the font size to 14

 

13) Insert static text field that contains an underline to separate records

a. To add an underline , Open the Palette

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

b. Drag the Static Text object below the Pickup By static text field and near the bottom of the Detail1 section

c. Double-click on the Static Text field and type in enough underline characters to separate records

 

14) Resized "Detail1" band in order to remove extra space between "Detail1" and "Page Footer" bands

a. Locate Band height within the Detail1-Properties Pane and set value to 110

The template should now look like the following:

 

15) This should be the end of modifying the Print Template for email.  Save the Print Template file to indicate is it for email.

 

16) Now some few modification need to be made for the Print Template for print

a. Need to change Image Expression within Image Properties so that the image name is used instead of URL

i. Select the box to the right of Image Expression

 

ii. Remove the URL, but keep the quotes and image file name

***NOTE: The image file must be in the same directory as the template***

 

iii. Verify the Image Expression is correct and disable  Is Lazy within the image-Properties pane.

a. Change Page Height: 792

b. Change all margins to 20

c. This should be the end of modifying the Print Template for print.  Save the Print Template file to indicate is it for print.

 

1 template for email and 1 template for print. These templates are basically the same except for margins, and the "Is Lazy" option. This was needed to make both types print correctly.

Customized Hold Pickup Templates (HoldCancelNotice_email, HoldCancelNotice_print )

Back to Top

Import the Customized Print Template Back Into Millennium

Import the customized template into Millennium

1) Admin | Settings | Print Template tab

2) Select Hold Pickup Notice  from Output Type drop-down menu

3) Verify that Use Print Templates is checked

4) Select Import

 

5) A New Print Template Attribute window will appear.

a. Fill in the Template family name

b. Fill in the Description

c. Select Browse

Print templates for circulation notices and receipts are grouped into template families. You can create a custom list of preferred template families, preview and modify template families, and save your template family settings.

 

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

a. Select the custom template file

b. Choose to Open

 

7) Select email for Delivery Method. Then OK (this is the email template).

 

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

 

9) Select the custom template again and choose Preview.

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

10) Load the Print Template to be used for print

a. Highlight the custom template under Preferred Template and choose Edit

 

b. Select Import

c. Select Browse

d. Navigate to the directory where the custom template was saved.

i. Select the custom template file (this time select the one saved for print)

ii. This time you have to select both the template file and graphic file (hold down the Control key)

iii. Choose to Open

e. Select printer for Delivery Method. Then OK (this is the print template)

f. The Edit Template Family window will appear. Notice that both email and printer are listed now. Choose Exit.

 

g. Choose Save Settings. Then click on OK.