Focal Point
Row Shading is different with PDF
March 21, 2007, 10:26 AM
Jeff ElamRow Shading is different with PDF
We are utilizing a stylesheet that shades every other row. We are using the wrap feature, as some of our columns have a lot of data. In HTML, it works like a charm--shades by cell. In other words, the full row of data, regardless of any wrapping is shaded in the same color. However, in PDF it literally shades by row of text, so if a cell spans to a new line, that new line is shaded a different color. Has anyone seen this behavior, and is there a workaround? We are using 7.6 on Windows XP.
Jeff Elam
WF 8 in Windows
March 21, 2007, 10:35 AM
Alan BYes it does do this, and I cannot get it to behave as I want!
Alan.
WF 7.705/8.007
March 21, 2007, 10:39 AM
Francis MarianiYup. Nasty.
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
March 21, 2007, 10:40 AM
Danny-SRLHi jeff,
I'm running on 7.1.3 and I don't have a problem. Try running this and see if you get what you wanted:
TABLE FILE CAR
PRINT
STANDARD
WARRANTY
BY COUNTRY
BY CAR
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='A4',
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N1,
BACKCOLOR='NONE',
$
TYPE=DATA,
COLUMN=N2,
BACKCOLOR='NONE',
$
TYPE=DATA,
COLUMN=N3,
BACKCOLOR=( RGB(255 255 153) RGB(204 255 204) ),
$
TYPE=DATA,
COLUMN=N4,
BACKCOLOR=( RGB(204 255 204) RGB(255 255 153) ),
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=REPORT,
COLUMN=N3,
WRAP=0.750000,
$
TYPE=REPORT,
COLUMN=N4,
WRAP=0.750000,
$
ENDSTYLE
END
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 21, 2007, 10:46 AM
Francis MarianiA solution, but the alternating colour style-sheet code may interfere with other styling you may require...
TABLE FILE CAR
PRINT
COMPUTE ALTERNATOR/A1 = IF LAST ALTERNATOR EQ '1' THEN '0' ELSE '1'; NOPRINT
COMPUTE TEST1/A110 = 'THIS IS TO TEST WRAPPING AND ALTERNATING LINE COLOUR / THIS IS TO TEST WRAPPING AND ALTERNATING LINE COLOUR';
CAR
COUNTRY
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLESHEET *
TYPE=REPORT, FONT='ARIAL', SIZE=8, $
TYPE=DATA, BACKCOLOR=SILVER, WHEN= ALTERNATOR EQ '1', $
TYPE=REPORT, COLUMN=TEST1, WRAP=2, $
END
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
March 21, 2007, 11:20 AM
Francis MarianiHere's an example of what Jeff described, something else in the style-sheet breaks the alternating colour...
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
March 21, 2007, 11:37 AM
Jeff ElamThanks, everyone, for your postings--especially Francis for posting an example of the behavior. Daniel & Francis. I can run both of yours, and they work fine (shade every other row, regardless of whether the data is wrapped or not. Here is our stylesheet--any suggestions on fixing it would be greatly appreciated.
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
$
TYPE=DATA,
SIZE=8,
BACKCOLOR=( RGB(234 234 255) 'WHITE' ),
$
TYPE=TITLE,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=9,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=9,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
SIZE=9,
STYLE=BOLD,
$
TYPE=HEADING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(232 232 241),
SIZE=12,
COLOR='WHITE',
BACKCOLOR=RGB(232 232 241),
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
SIZE=14,
$
TYPE=FOOTING,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(232 232 241),
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=9,
STYLE=BOLD,
$
TYPE=SUBFOOT,
BORDER=LIGHT,
BORDER-STYLE=RIDGE,
BORDER-COLOR=RGB(51 51 153),
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=SUBTOTAL,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSVALUE,
SIZE=8,
STYLE=BOLD,
$
TYPE=ACROSSTITLE,
SIZE=8,
STYLE=BOLD,
$
Jeff Elam
WF 8 in Windows
March 21, 2007, 11:38 AM
Alan BExactly Francis, and I just remembered why I avoid wrap with PDF when I tried your code, which does work pretty well. If you have TOPGAP and BOTTOMGAP set to anything reasonable, to space the lines, the PDF wrap has these values also on each wrapped line, looks horrible. Landscape, Squeeze and subfoot!
Alan.
WF 7.705/8.007
March 21, 2007, 02:22 PM
mgrackinJeff,
The usage of BORDER is causing your problem. Remove all usage of BORDER and use GRID instead. Then open a case with Tech Support.
I tested this with WF 7.1.3.
TABLE FILE CAR
PRINT STANDARD WARRANTY
BY COUNTRY
BY CAR
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
$
TYPE=TITLE,
GRID=ON,
SIZE=9,
COLOR='WHITE',
BACKCOLOR=RGB(147 172 219),
STYLE=BOLD,
$
TYPE=DATA,
SIZE=8,
BACKCOLOR=( RGB(234 234 255) 'WHITE' ),
$
TYPE=REPORT,
COLUMN=STANDARD,
WRAP=1.00,
$
ENDSTYLE
END
Thanks!
Mickey
| FOCUS/WebFOCUS 1990 - 2011 |
March 21, 2007, 02:42 PM
FrankDutchI wonder if this latest solution really gives the changing color effect that we want. I will give that a try tomorrow.
On the other hand, in the old days we had preprinted paper that looks the same, but then if there was a wrapped line, the color changed too......
Frank
|
Frank |
| prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
March 21, 2007, 02:45 PM
Alan BDamn, you're right Mickey.
I have one border on a subfoot, and it throws the row shading out. That's bad.
Alan.
WF 7.705/8.007
March 21, 2007, 03:16 PM
mgrackinFYI,
You can apply GRID=ON for a HEADING, a FOOTING, a SUBHEAD, a SUBFOOT, TITLE, DATA, etc. individually so you should be able to get the look (or pretty close) of BORDERS. The only thing that you cannot control is the style or the color of the lines of the GRID.
I avoid the use of BORDER commands because the side affects are not good.
Thanks!
Mickey
| FOCUS/WebFOCUS 1990 - 2011 |
March 23, 2007, 04:53 PM
Jeff ElamThanks, all. Removing the BORDER statements resolved the problem. I appreciate everyone's assistance.
Jeff Elam
WF 8 in Windows