Focal Point
[CLOSED] Wrap field causes problems with repeating subhead in multi-page PDF file

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8527042776

July 14, 2015, 12:02 PM
jhasty
[CLOSED] Wrap field causes problems with repeating subhead in multi-page PDF file
Was wondering if anyone could take a look and tell me if this is a bug. If so, is there a possible work around?

What is happening here is I have a PDF where I am attempting to repeat a subhead on each page break. I also have a data description field that I need to wrap due to it's length. Problem is when I wrap the data description it pushes the tabpageno onto the next page before it repeats the subhead. If you look at the first line on page 2, it still show tabpageno is 1. Then repeats then subhead and the tabpageno starts numbering with 2.
Plus the wrap field goes wild on that first line as well (which is less of a concern because isn't happening in my actual report).

I have reproduced this using the car file for easy reference.

Any thoughts on a work around here or should I log a bug ticket?

Thanks.

  
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS TEST_CAR
-* just did a more to get more than a single page worth of data
MORE 
  FILE CAR
END

DEFINE FILE TEST_CAR
  LONG_DATA_DESCRIPTION/A4000 = 'xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx';
END

TABLE FILE TEST_CAR
PRINT
  TABPAGENO AS ''
  LONG_DATA_DESCRIPTION AS ''
  COMPUTE ROWCNT/I9 = LAST ROWCNT + 1; NOPRINT
BY CAR AS ''
BY TOTAL ROWCNT NOPRINT
ON ROWCNT SUBHEAD
"TEST SUBHEAD"
"<+0>Car<+0>TABPAGENO<+0>Long Data Description<+0>"
WHEN CAR NE LAST CAR OR TABPAGENO NE LAST TABPAGENO;
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
    PAGESIZE='Letter',$
type=report,headalign=body,$
type=report,column=CAR,wrap=1,$
type=report,column=TABPAGENO,wrap=1,$
type=report,column=LONG_DATA_DESCRIPTION,wrap=4,$
type=data,size=8,justify=left,$
ENDSTYLE
END

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8008
Windows, All Outputs
July 14, 2015, 06:29 PM
Waz
Unfortunately TABPAGENO isn't really available for this type of usage.

In my last job I ended up calculating when the page was going to change to put the heading in.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 15, 2015, 10:39 AM
jhasty
Sounds similar to what I was going to do to work around it. The metrics for the report are all stored in a database table and I was going to add a column for page number to control which metrics appear on each page. But I was hoping to find a solution that required less maintenance though.


WebFOCUS 8008
Windows, All Outputs
July 15, 2015, 06:17 PM
Waz
I created something a while ago that would truncate a text string to fit on the page.

You may be able to use it to determine if the long line will wrap.

Truncating Text in the Heading of a PDF Document


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!