Hiding Elements - Printable Version of a Page

Rather than create a printable version of a page that is a copy of a given page sans buttons, headers and other elements that don't look good on a hard-copy, you can add a simple button and then define which fields you don't want to be printable. Much easier.


  1. Add a button or link to your page.
  2. Under the Push Button/Hyperlink Page Properties setup as follows:
    Destination = 'External Link'
    External Link = 'Dynamic'
  3. Add some PeopleCode:
    DERIVED_REC.JS_PRINT.Value = "javascript:window.print()";

    Now you have a basic link on your page that when clicked will print it from the browser.
  4. Add a HTML Area to the page with the following value:

    <style type="text/css">
    @media print {
    #PAGEBAR, .PSHEADERTOOLBARFRAME, #PRINT_BTN,
    #INFO,
    #DERIVED_REC_JS_PRINT { display: none }
    }
    </style>


    Note that #DERIVED_REC_JS_PRINT is the link you made in step 1.
    #Info in this example is a chunk of HTML text I wrapped in <span id="Info">
    You can add any field, usually in the format RECORD_NAME_FIELD_NAME, check your HTML source to be sure.