Focal Point
[CLOSED] PDF Indentation on Specific Cells

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

May 23, 2017, 10:51 AM
Ifra
[CLOSED] PDF Indentation on Specific Cells
Hi, I'm using WebFocus 7705 and trying to do indentations on specific rows and I'm having trouble doing so.

Currently what I'm writing is--
TABLE FILE CAR
PRINT
COUNTRY
ON TABLE PCHOLD FORMAT PDF
END
-RUN

and it looks like--

COUNTRY
-----------
ENGLAND
JAPAN
ITALY
W GERMANY
FRANCE

but I want it to look like

COUNTRY
-----------
ENGLAND
JAPAN
ITALY
W GERMANY
FRANCE

where the data rows will be indented. I've tried to use the code below, but the problem is that the column header gets indented as well.

TABLE FILE CAR
PRINT
COUNTRY
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='A4', TOPMARGIN=0.000000, SQUEEZE=OFF, ORIENTATION=PORTRAIT, $
TYPE=REPORT, COLUMN=P1, LEFTGAP=1, $
END
-RUN

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
May 23, 2017, 11:21 AM
MartinY
Hi Ifra,

Assuming that is the expected result:
COUNTRY
-------
        ENGLAND
        JAPAN
        ITALY
        W GERMANY
        FRANCE


Here is a easy solution:
TABLE FILE CAR
PRINT COMPUTE DUMMY/A8 = ''; AS 'COUNTRY'
      COUNTRY AS ''
ON TABLE PCHOLD FORMAT PDF
END
-RUN


But may not be the proper one depending of what you need.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 23, 2017, 02:45 PM
Ifra
Hi Martin,

Your assumption was correct that is what I want the output to look like. The only problem with the presented solution is that the end goal is to create a heirachy-like look where some elements will indented like--

COUNTRY
---------
++ENGLAND
JAPAN
++++ITALY
++W GERMANY
FRANCE

where the pluses are the indents.


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
May 23, 2017, 03:20 PM
MartinY
What would be the rule the determine if it must have no indent, two or four (as per your example) ?

If you have such a rule, you can add space to mimic an indent similar to this:
DEFINE FILE CAR
DUMMY1 /A30 = IF COUNTRY EQ 'ENGLAND' OR 'W GERMANY' THEN '  '   | COUNTRY
         ELSE IF COUNTRY EQ 'ITALY'                  THEN '    ' | COUNTRY ELSE COUNTRY;
END
TABLE FILE CAR
PRINT DUMMY1  AS 'Country'
ON TABLE PCHOLD FORMAT PDF
END
-RUN

You'll have to play around with it and even make it more dynamic. This is just a starting point.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 24, 2017, 12:17 PM
Ifra
Such a simple solution I didn't come up with! That solves my problem. Thanks, Martin.


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
May 24, 2017, 01:01 PM
Ifra
Just out of curiousity--is there not a way to just add some type of left padding onto the data cells? I tried searching, but wasn't able to find anything.


WebFOCUS 8
WebFOCUS 7705
Windows, All Outputs
May 24, 2017, 01:25 PM
MartinY
As far as I know : No


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 24, 2017, 04:42 PM
susannah
lookup LEFTGAP and RIGHTGAP,
eg: LEFTGAP=.5, RIGHTGAP=.5,

except it doesn't work...it can adjust the column, the entire column, but not the content within it...
I'm going with Martin's answer

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
May 25, 2017, 07:30 AM
MartinY
Haven't thought about it Susannah, good call

This one can also be a good option: Position/Gap


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 28, 2017, 12:59 PM
Doug
Nice Susannah, I was about to suggest that till I saw that you just did Smiler
quote:
ookup LEFTGAP and RIGHTGAP,
eg: LEFTGAP=.5, RIGHTGAP=.5,





   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
December 07, 2017, 07:02 PM
Doug
quote:
Originally posted by Doug:
Nice Susannah, I was about to suggest that till I saw that you just did Smiler
quote:
Lookup LEFTGAP and RIGHTGAP,
eg: LEFTGAP=.5, RIGHTGAP=.5,





   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206