How to WRAP header and subheader when the report output is set to PDF ?

How to WRAP header and subheader when the report output is set to PDF ?

book

Article ID: KB0070106

calendar_today

Updated On:

Products Versions
ibi WebFOCUS -

Description

  • Firstly, we will see how the headers and sub-headers (with long set of characters) behave when used with HTML output format type :
  • Paste the below procedure :
    • TABLE FILE CAR
      BY  CAR.COMP.CAR
      ON TABLE SUBHEAD
      "A 200-word essay is a short piece. It might be assigned by a school teacher to test the student’s knowledge of the topic and their ability to formulate thoughts concisely. The most common genres for texts of 200 to 250 words are a discussion board post and a personal statement for a college application."
      ON TABLE SET PAGE-NUM NOLEAD
      ON TABLE SET ASNAMES ON
      ON TABLE NOTOTAL
      ON TABLE PCHOLD FORMAT HTML
      ON TABLE SET HTMLCSS ON
      ON TABLE SET STYLE *
           INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
      TYPE=TABHEADING,
      SIZE=12,
      STYLE=BOLD,
      LINE=1,
      WRAP=7,
      $
      ENDSTYLE
      END
  • Output looks like the below and it is perfect :
    • User-added image
  • Now when we change the output format type to PDF (by making just one change in the above code :)
  • ON TABLE PCHOLD FORMAT PDF, output looks like the below :
    • User-added image
  • In here, subheading is getting out of scope of the page .
  • To deal with this , we will follow the below instruction :

Issue/Introduction

This article covers the instructions to wrap the HEADER and SUBHEADER when the report output is set to PDF .

Environment

Windows and Linux

Resolution

  • We have to store the HEADER / SUBHEADER string in a field using COMPUTE .
  • Code looks like below :
    • TABLE FILE CAR
      PRINT CAR
      COMPUTE HDRTEXT/A600='A 200-word essay is a short piece. It might be assigned by a school teacher to test the student’s knowledge of the topic and their ability to formulate thoughts concisely. The most common genres for texts of 200 to 250 words are a discussion board post and a personal statement for a college application.'; NOPRINT
      ON TABLE SUBHEAD
      "<HDRTEXT"
      ""
      ON TABLE SET PAGE-NUM NOLEAD
      ON TABLE SET ASNAMES ON
      ON TABLE NOTOTAL
      ON TABLE PCHOLD FORMAT PDF
      ON TABLE SET HTMLCSS ON
      ON TABLE SET STYLE *
           INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
      TYPE=TABHEADING,
      SIZE=12,
      STYLE=BOLD,
      LINE=1,
      WRAP=7,
      $
      ENDSTYLE
      END
  • Verify the correct output from below :
    • User-added image

Additional Information

Case : 02232209