Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Harness forms - Supporting work item printing

Updated on April 5, 2022

Follow these steps to support complete or custom printing of work items in your application, including information about attachments and history.

In the Case Manager portal, the Print toolbar button starts browser-based printing, which prints the current user form as displayed. This printout may not include desired fields and may use colors, fonts, and labels that are not desired in hard copy prints.

Follow these steps to allow application users to print work items.

You can offer work item printing through a labeled button at the bottom of the user form or through an icon on the header. Development steps are similar. (These instructions assume the harness is in the newer SmartFrames format.)

When creating a custom harness for printing, select the standard PrintView harness in the Template field of the New dialog box, so that the generated HTML includes JavaScript references to harness_print.js in your copy.

  1. Perform one of the following actions:

    • To add an icon, go to step 2.
    • To add a button, go to step 3.
  2. On the Design tab, from the Data display list, drag Image onto the top-right array of icons and drop it into position.

  3. On the Design tab, from the Action list, drag Button onto the bottom area of the wireframe harness or to a cell and drop it into position.

  4. Select CUSTOM as the Type.

  5. Select an icon or enter text for a button label. The recommended icon is named iconPrint.

  6. Select PrintWork for the Do Action field as the activity to execute when the icon or button is clicked.

  7. To use the standard harness named Work-.PrintView, or a harness in your application named PrintView that overrides this standard harness, leave the first parameter blank.

    If you have created custom harnesses, enter the Purpose key part of a harness that supports printing as the first parameter.

  8. Select the Prompt parameter box if you want users to select which top-level sections to print.

    When selected, by default the dialog box is defined by the standard harness named Work-.PrintOptions.

  9. Choose in a pop-up window as the presentation.

  10. Complete the ToolTip text and other fields in the panel as desired.

  11. On the Scripts and Styles tab, enter the following elements in the Scripts array:

    • dhtmlx_common
    • dhtmlx_grid
  12. Save the harness.

In advanced cases, if you selected the Prompt parameter, the standard activity Work-.Print presents the harness named PrintOptions (or another if specified) to the user. The standard Work-.PrintOptions harness lets users select which of four top-level sections are to be printed; this information is then conveyed to the Work-.PrintView harness. You can override the activity and these two harnesses in your application, to control which top-level choices are presented, the layout and format of the print version of the work item, and other processing.

The appearance of printed output depends on browser vendor and version, printer capabilities, and printer driver software. Not all printer drivers produce output that is highly faithful to the on-screen browser displays. For example, if your application skin CSS includes non-W3C features such as Microsoft's DHTML gradient filters, some printer drivers may print a solid color or omit information.

You can create a separate CSS for use in printing. Start with a copy of the workform_application skin CSS for your application, and modify the copy to adjust colors, fonts, font-sizes and other styles as desired, eliminating or disabling any styles that the printer driver cannot render appropriately. Reference that CSS on the Scripts and Styles tab of the harness you use for printing.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us