Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Conditional highlighting in Report

0 views
Skip to first unread message

Troy Hanson

unread,
Feb 9, 2002, 6:57:18 PM2/9/02
to
Hello all,

I have been working with a task and not making much headway. I am
working with a table of cars at a bent-car dealership (repairables).
When printing out a list of the inventory, I need to set apart (make
the background lightgray, and the font bold) the cars that have parts
included. Simply enough, these cars have the word "parts" in the
description field. I cannot find a place to put code attached to the
report that will search the description field of each record for the
text match, then change the report accordingly, so I have tried using
the "open report as form".

Using this method (report as form), I run a SQL Statement when the
form is opened to grab the inventory (unsold cars) out of the entire
database of cars (it is a flat table, all sold and unsold cars are in
it), then I attach code to the form method that runs for each record,
using the advmatch("description", [Pp][Aa][Rr][Tt]); operation then
changing color and text attributes on a match.

This works, but with 2 big problems:
1) It will only highlight the records that match if I manually cursor
down the list on the output form, implying code is executed on 'cursor
enter', not on 'record item create' (which confused me, the comments
on the form action say "this code is executed for each record", it
didn't say when)
2) When I try to print the inventory (which is usually 6-7 pages long
with about 26 items per page, I can only print the page that is being
viewed as a form, rather than all of the pages coming out. When I
select File |Print, "All Pages" is selected, but it still only prints
a single page (without the header and page numbers, also).

Am I going about this wrong trying to do it as a form? I would rather
do it as a report, since I am losing the page headers and numbers when
switching to a form, but when looking at a report's properties, I see
no place where I can even enter code that is run for each record line
generated (if I could be told if/where this exists, I could probably
figure out the rest).

Thanks in advance for any help!
troy
troy at mountaintop dot org

0 new messages