Use alternating row styles in reports?

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
timeBandit
Posts: 1
Joined: Wed Nov 21, 2007 7:51 pm

Use alternating row styles in reports?

Post by timeBandit »

Hi all,
I've used OOo & StarOffice for many years but this is the first time I've encountered a problem I couldn't solve by consulting the manuals, online help or Google. So here I am. :)

I have a small database to inventory my movie collection, including a simple report to list titles with ratings and running times. Since the title column occupies most of the page width, the layout needs something to guide the eye across large spans of whitespace in each row.

I edited the Tbl_Record_Content style in the report to add a faint bottom border--that does the job but is not my first choice. I'd like to apply different styles to odd and even rows in the report, for example:
Close Encounters of the Third Kind .......... PG 2:17
Cool Hand Luke .......... NR 2:07
Crouching Tiger Hidden Dragon .......... PG-13 2:00
Das Boot .......... R 3:30
...though in practice, I'd like to alternate between white and shaded backgrounds.

I tried creating two template rows in the report editor, one with each style, but when I run the report only the second row repeats, giving a result like this:
Close Encounters of the Third Kind .......... PG 2:17
Cool Hand Luke .......... NR 2:07
Crouching Tiger Hidden Dragon .......... PG-13 2:00
Das Boot .......... R 3:30
I also tried creating a second style, Tbl_Record_Content_Even, using the Organizer style tab to set each content style as the "Next Style" for the other. This also failed--every row was styled with Tbl_Row_Content, which was the style on the template row. The custom style wasn't used at all.

This seems a fairly ordinary design goal so I'm inclined to believe the problem is between the keyboard and chair. ;) Is it possible?

Thanks in advance.

(PS: Having somehow failed to notice this official forum, I posted this question [verbatim] at oooforum.org a few days ago, with no useful response yet. Please excuse the cross-post.)
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Use alternating row styles in reports?

Post by DrewJensen »

OK - I tried to setup an example of how to do this with the new SUN Report Builder extension using a user defined function in the report. This resulted in my opening an issue

http://www.openoffice.org/issues/show_bug.cgi?id=83889

Marked today as fixed, but not available until the 2.4 release...hmmm, have no idea how that works since this is an extension and not the main package.

Anyway - as soon as I can get my hands on the patched version I'll try it again.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
User avatar
MartinRF
Posts: 11
Joined: Fri Feb 29, 2008 10:37 pm

Re: Use alternating row styles in reports?

Post by MartinRF »

I have no solution but would like to cast my vote in favor for this feature as it would be very useful at times.

/Martin
Post Reply