April 24, 2006, 11:30 AM
dtrangMixing webfocus stylesheet with manual styling.
Hi,
I have a webfocus stylesheet that I'm applying to my report to get a basic look and feel. I also want to set the size of one of my columns, which I'm doing with the WRAP style attribute in the report. However, when I apply the WRAP style to my column I lose the formating in the style sheet... Is there a way I could get the basic look and feel from the webfocus style sheet and have the flexibility to set the sizes of my columns in my report? Thanks.
Below is a sample of my code for clarification purposes:
...
ON TABLE SET STYLESHEET portal
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=REPORT,
COLUMN=N2,
WRAP=5,
$
ENDSTYLE
.....
April 24, 2006, 11:49 AM
Tim JThe line:
ON TABLE SET STYLE *
is the equivalent of:
ON TABLE SET STYLESHEET *
This line is probably overriding your initial style sheet, portal. Try eliminating this line from your code to get the results you want.
April 24, 2006, 12:29 PM
dtrangHi Tim,
Thank you for your reply.
I tried removing ON TABLE SET STYLE *, but I get an error... my code now looks something like this:
...
ON TABLE SET STYLE portal
$
TYPE=REPORT,
COLUMN=N2,
WRAP=5,
$
TYPE=REPORT,
COLUMN=N1,
WRAP=2,
$
ENDSTYLE
...
Thanks for your help.
April 24, 2006, 01:12 PM
Tim JAnother technique you can use is:
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=N2, WRAP=5, $
-INCLUDE portal2
ENDSTYLE
Where portal2 is a fex containing all the default styling. I have used this in the past. This way you can use the default styling to start and add custom changes like you need.
April 24, 2006, 03:34 PM
Francis MarianiIn fact, there's no way to set a stylesheet and then override it with inline styling.
The only way is to do what Tim J suggested - use a -INCLUDE.
I never use .STY stylesheets.
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
April 24, 2006, 04:20 PM
Tony AAlternatively use a combination of CSS and WebFOCUS style sheets.
I tend to use a standard style INCLUDE that references a standard CSS declared idurng initialisation.
T
April 24, 2006, 04:42 PM
MikelI agreed totally with
Tim and
Francis.
In order to combine general style sheet and inline style we must include the general style inside a focexec and retrieve it using -INCLUDE.
ON TABLE SET STYLE *
-* Default application style (style1.fex)
-INCLUDE STYLE1
-* Other default style (stylen.fex)
-INCLUDE STYLEn
-* Particular report style inline.
-* overriding previous if duplicated...
TYPE=REPORT, COLUMN=N2, WRAP=5, $
ENDSTYLE
Regards,
Mikel
April 28, 2006, 02:17 PM
dtrangThanks for the suggestions!
The include of the .fex file with the styles seems to work.
Thanks!