Focal Point
[SOLVED] PDF and HTML output different with alternate row color

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

February 12, 2009, 04:13 AM
GamP
[SOLVED] PDF and HTML output different with alternate row color
Hi,

I'm not in the habit of asking questions, but I now have a thing that I do not seem to be able to remedy. Thing is:
In my style sheet I have a line:
TYPE=DATA,
     BACKCOLOR=(RGB(235 240 178) RGB(255 255 255)),
$

This produces the alternate row color in my report.
When I have an html report that contains several rows, I get each record in the alternate color, even if one of the fields in the record spans 2 or 3 lines.
But when I change the output to PDF, I get every line in the alternate color, in stead of every record.
So HTML:
line 1
line 2
wrapped
line 3
And in PDF it becomes:
line 1
line 2
wrapped
line 3

How to get the PDF output the same as the HTML output - That's my question.

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


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 12, 2009, 04:37 AM
Tony A
GamP,

Doesn't give a problem using the set-up here, all three formats are fine -

-DEFAULT &WFFMT = 'PDF'
TABLE FILE CAR
PRINT COMPUTE LONG_LINE/A1000 = 'This is a very long line of data, set up so that it wraps '
                               |  'onto the next line within a report and to test the alternate '
                               |  'colour syntax in style sheets. It goes on and on and on and '
                               |  'on and on and on and on and on ..........';
   BY COUNTRY
   BY CAR
   BY MODEL
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE OFF
ON TABLE SET STYLE *
  UNITS=IN, PAGESIZE='A4', LEFTMARGIN=0.19, RIGHTMARGIN=0.19, TOPMARGIN=0.00, BOTTOMMARGIN=0.00,
  SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
  TYPE=REPORT, FONT='ARIAL', SIZE=8, COLOR=BLACK, BACKCOLOR='NONE', STYLE=NORMAL, $
  TYPE=REPORT, COLUMN=LONG_LINE, WIDTH=4, WRAP=4, $
  TYPE=DATA, BACKCOLOR=(RGB(235 240 178) RGB(255 255 255)), $
END
-RUN

What style sheet commands are you using?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 12, 2009, 04:58 AM
GamP
T,

I knew I count count on you.
Your piece of code set me on the right track.
There was another TYPE=REPORT in my style sheet that obviously interfered, but which I need for html output. After removing this (for non-html output) I got the desired output.

Thanks,


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 12, 2009, 06:28 AM
Tony A
Glad to be able to settle the grey cells Wink

T
October 15, 2010, 12:22 PM
John_Edwards
Can't get this to work to save my life. I can make Tony's mini example work but the minute I bring it into a report with substance it puts alternating colors on the same line. Shouldn't be this hard.

As best I can tell the only time this issue is "SOLVED" is when you have absolutely no other styling requests included in the focexec, which is going to be pretty doggone rare for me.

I have opened a case -- 63052524 and with any luck some alternatives will be available.

J.

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