Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Wrapping a field in a heading - Difference in PDF and HTML
Go
New
Search
Notify
Tools
Reply
  
Wrapping a field in a heading - Difference in PDF and HTML
 Login/Join
 
Platinum Member
posted
Hi All,

I have a question about the following focexec using the CAR file:

-*************************************************************************
-SET &TEXT = 'This is my long piece of text that needs to be wrapped.';
-*
DEFINE FILE CAR
MyText/A100 = '&TEXT' ;
END
-*
-*-GOTO PRT_HTML
-*
TABLE FILE CAR
HEADING
"MyText: <MyText "
PRINT COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=FIELD, WRAP=1, $
ENDSTYLE
END
-EXIT
-*
-PRT_HTML
DEFINE FILE CAR
MyText/A100 = '&TEXT' ;
END
-*
TABLE FILE CAR
HEADING
"MyText: <MyText "
PRINT COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=FIELD, WRAP=1, $
ENDSTYLE
END
-*************************************************************************

Run this asis (PDF version) and then un-comment the "-*-GOTO PRT_HTML" line and run again (HTML version).

In the PDF version, the "MyText:" label appears on the first line or top part of the wrapped text(this is what I want).
In the HTML version, the "MyText:" label appears on the last line or bottom part of the wrapped text.

How do I get the "MyText:" label to appear on the first line(top part) of the wrapped text in HTML?

Please advise.

Thanks
Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 226 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
Guru
posted Hide Post
Try
  
-PRT_HTML
DEFINE FILE CAR
MyText/A100 = '&TEXT' ;
END
-*
TABLE FILE CAR
HEADING
"MyText: <MyText"
PRINT COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY, $
TYPE=HEADING, LINE=1, ITEM=2, WRAP=1, $
ENDSTYLE
END

This message has been edited. Last edited by: Mighty Max,


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Interesting behavior. If you look at the source for the resulting HTML page you sill see that the long text is encapsulated in a SPAN object when you leave out the HEADALIGN setting. The CSS in the source does indicate 'vertical-align:top' but it does not seem to move the 'MyText:' to the top of the cell when the SPAN is also in the same cell. HEADALIGN forces that HEADING items into seperate cells, hence causing the 'MyText' to shift to the top of the cell.

Jim, I wrote a couple of articles on HTML vs PDF output formats you might find useful. Go to the following link and look for WebFOCUS HTML and PDF Report Design near the bottom. There are two parts.

Tips and Techniques Articles


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks Mighty Max and Mickey.

Mighty Max,

I made your change and that fixed the problem, although in my real fex, I had been using HEADALIGHN=NONE so now I have other issues.

Mickey,

I've read both parts of your article. They have been very helpful. Thanks

I'm currently working on a project where I need to create (in HTML) freeform text/fields that will be displayed in portal pages. I'm doing this by putting all the text and data fields in one big heading and trying to controll the formatting and look by stylesheet parameters. I'm hand coding this(don't use the GUI). If anyone has any examples of this or any advise, I would appreciate your comments.

One question, is there a way of setting the window/page size for the report, so the report will scroll side-to-side instead of wrapping?

Thanks
Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 226 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Wrapping a field in a heading - Difference in PDF and HTML

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.