Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Alternating row colors

edited September 2003 in End User
Is there an way that the end user can have alternating rows appear in a
different color in a list report? I know it can be done at design time but
I would like to have it as part of the report template and be able to turn
on / off at run time.

Thanks,
Bob

Comments

  • edited September 2003
    Hi Bob,

    In any case you'll have to have code that executes for a report. You could
    cod ethis feature by adding draw commands to each page on the output side of
    the report, since you may not want to go into each of your end user's
    reports to change the layout to add a shape component to the detail band.
    One way would be to store a boolean value in a custom parameter defined in
    each report whether or not it should alternate the band colors. Then your
    code will check the parameter value when the report runs to see if it should
    draw colored draw commands for each detail band. Here is an example that
    switches the band colors by using the draw command approach to get you
    started:
    http://www.digital-metaphors.com/tips/Greenbar.zip


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.