[Download-List] Alternate row colors for HTML

Dale Young youngd at Auctor.com
Fri Feb 29 12:57:29 EST 2008


Hi Marc,

 

Here's how I tried it using the style sheet:

 

HTML.ROW EVAL "IF REC.CNT GT 0 THEN \CLASS='TABLE.ROW1'\ ELSE
\CLASS='TABLE.ROW2'\"

 

Here' how I tried it with not using the style sheet:

 

HTML.ROW EVAL "IF REC.CNT GT 0 THEN 'BGCOLOR=#FFFFFF' ELSE
'BGCOLOR=#E1ECF2'"

 

Neither one has changed the colors. REC.CNT is an I-descriptor that
calls a subroutine passing it the number one. The subroutine has an
unnamed COMMON using variable HTML.REC.CNT. The one gets added to this
variable. Coming back form the subroutine I use the MOD statement, IF
MOD(@1,2) = 0 THEN '1' ELSE '0'.

 

I-descriptor:  SUBR('RECORD.COUNT','1');IF MOD(@1,2) = 0 THEN '1' ELSE
'0'

 

Subroutine RECORD.COUNT:

 

0001:       SUBROUTINE RECORD.COUNT(RESULT,REC.CNT)

0002:       COMMON HTML.REC.CNT

0003:       RESULT = ''

0004:       HTML.REC.CNT += REC.CNT

0005:       RESULT = HTML.REC.CNT

0006:       RETURN

0007:    END

 

This does work well with a list statement:

 

LIST FILE.NAME REC.CNT TOT.REC.CNT

 

                          TOT

                          REC

KEY            REC CNT    CNT

 

2                    0      1

3                    1      2

14                   0      3

28                   1      4

29                   0      5

30                   1      6

44                   0      7

45                   1      8

59                   0      9

60                   1     10

 

10 records selected.

 

I'd appreciate any help you could give me.

Thanks!

Dale

________________________________

From: download-list-bounces at cedarville.edu
[mailto:download-list-bounces at cedarville.edu] On Behalf Of Bessler, Marc
Sent: Friday, February 29, 2008 11:56 AM
To: Cedarville DOWNLOAD Users
Subject: RE: [Download-List] Alternate row colors for HTML

 

Hi Dale,

 

I have played around quite a bit with HTML formatting via DOWNLOAD.
Could you send me the EVAL statement you are trying out?

 

Marc Bessler
Data Support Specialist
Phillips Exeter Academy
20 Main Street
Exeter, NH  03833

Telephone: 603-777-3367
Fax: 603-777-4382
Email: mbessler at exeter.edu <mailto:mbessler at exeter.edu> 
Website: http://phillips.exeter.edu <http://phillips.exeter.edu/> 

 

 

 

________________________________

From: download-list-bounces at cedarville.edu
[mailto:download-list-bounces at cedarville.edu] On Behalf Of Dale Young
Sent: Friday, February 29, 2008 9:36 AM
To: download-list at cedarville.edu
Subject: [Download-List] Alternate row colors for HTML

I'm trying to get DOWNLOAD to create alternating colors for rows in a
table using a linked style sheet. Example of the style sheet would be:

 

.table-row1 { background-color: #FFFFFF }

.table-row2 { background-color: #E1ECF2 )

 

Our company is a vendor working with the government and it's their style
sheet that they use for their intranet reports. They're wanting us to
use the same style sheet when creating reports from Universe. I've tried
setting up a subroutine with a common area keeping the count of records
processed using the MOD function:

 

Record 1 = 0

Record 2 = 1

Record 3 = 0

Etc.

 

I would think I could use the HTLM.ROW EVAL function, but not getting it
to work. Any ideas?

 

Thanks, 
Dale Young | Auctor 
Indianapolis, IN 46240 

CONFIDENTIALITY NOTICE: This message, including any
attachments, is intended solely for the use of the named
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure,
distribution, or reproduction of the contents in this
communication is strictly prohibited.  If you are not the
intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Thank you.
 
 
This message has been verified to have been sent from
Auctor Corporation or one of its subsidiaries by Postini
Email Security Services.
 

CONFIDENTIALITY NOTICE: This message, including any
attachments, is intended solely for the use of the named
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure,
distribution, or reproduction of the contents in this
communication is strictly prohibited.  If you are not the
intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message.
Thank you.


This message has been verified to have been sent from
Auctor Corporation or one of its subsidiaries by Postini
Email Security Services.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.cedarville.edu/pipermail/download-list/attachments/20080229/67c166f7/attachment.html>


More information about the download-list mailing list