Focal Point
[CLOSED] Using Squeeze with TYPE=TITLE, PDF & OVER

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

October 31, 2011, 03:17 PM
kfreers
[CLOSED] Using Squeeze with TYPE=TITLE, PDF & OVER
I looked for an answer on FocalPoint but I couldn't find one so I'm going to post my question.

In the following code, I'm wondering why the titles are affected by the SQUEEZE=3 in the TYPE= line when I output to HTML but it is ignored when I output to PDF. If you run the same code with the 'ON TABLE PCHOLD FORMAT PDF' commented out and then uncommented, you will see that the titles are 3" in HTML but only as wide as the longest title in PDF. Is there any way to control the width of the title columns in a PDF when using OVER? Does anyone have a work-around?

Thanks!

TABLE FILE GGSALES
SUM DOLLARS AS 'Dollar Amount' OVER
UNITS AS ' No. of Units'
ACROSS REGION
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM NOPAGE
ON TABLE SET STYLE *
SQUEEZE=ON,$
TYPE=TITLE,COLUMN=N1,SQUEEZE=3,STYLE=BOLD,$
ENDSTYLE

END
-RUN

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


WebFOCUS 8.104
Windows, All Outputs
October 31, 2011, 04:51 PM
Francis Mariani
Creating Reports With WebFOCUS Language > Laying Out the Report Page > Arranging Columns on a Page

Documentation says:

[TYPE=REPORT,] COLUMN=identifier, SQUEEZE={ON|OFF|width}, $


quote:
TYPE=REPORT - Applies the column width to the entire report. Not required, as it is the default.

SQUEEZE will not work with TYPE=TITLE.

quote:
Note: SQUEEZE is not supported for columns created with the OVER phrase.

SQUEEZE will not work with OVER.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 01, 2011, 08:24 AM
kfreers
Francis,

Thanks for your response. I guess my question now is why does SQUEEZE work with OVER when the output is HTML but not PDF? In my code, if you comment out the 'ON TABLE PCHOLD' line and run the report, the titles react to the 'SQUEEZE=3' command even though there is a OVER. It's when the output is PDF that it ignores it. Strange!

Is there any way to control the width of the title column when output is PDF?

Thanks,

Keith


WebFOCUS 8.104
Windows, All Outputs
November 01, 2011, 09:52 AM
Mary Watermann
I had a similar problem to this on a project. I was not using OVER but ACROSS.

I couldn't wrap/squeeze the column titles from the ACROSS statement. The columns wrapping worked in HTML, as HTML does its own thing.

Just because it may work in one format (HTML), doesn't mean the same thing will work in another format (PDF).


WF 7.6.10, Windows, PDF, Excel
November 01, 2011, 10:31 AM
njsden
quote:
Just because it may work in one format (HTML), doesn't mean the same thing will work in another format (PDF).

As CSS is so rich when it comes to styling it probably gives WebFOCUS more flexibility to implement those particular style definitions in HTML. Although PDF support has improved significantly since I guess WF 7.6.11 (we can now use HEADALIGN=BODY and there's support for pixel-perfect reports) it is still a bit limited when compared to what can be achieved with HTML.

Personally, I try not to use OVER or ACROSS (and definitely never together Smiler ). I know it is ridiculous having to implement many things in code when a simple keyword would do it for you but as styling usually causes me trouble in cases like those, I end up using McGyver to implement what OVER would give me and data buckets to replace ACROSS.

As a bonus, I gain slightly more flexibility when dealing with FOOTING/SUBFOOT and definitely much more control in styling ... but all of that at the price of more complex logic. It is a tradeoff but it has worked for me.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.