Re: Alternate Background
- From: Helpful Harry <helpful_harry@xxxxxxxxxxxxxxxx>
- Date: Wed, 14 Dec 2005 18:27:04 +1300
In article <1134485245.043499.230770@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"Yoyo" <pengxian@xxxxxxxxx> wrote:
> Hi,
> I want to create one report in preview mode, and I'd like to print
> the rows with
> alternate background like portal. I wonder how to implement it. Thanks
> a lot.
It's fairly easy.
First create a new Global field to hold the coloured background you
want for the alternate rows.
g_BackgroundColour Global, Container
Go onto any layout and temporarily put this field on. Use the rectangle
tool to draw a small square and set the line and fill colours and
patterns to whatever you want to use behind the alternate rows (a light
colour is best so that you can still read the text in the fields placed
on top of it). Copy this square, go into Browse mode and paste it into
the g_BackgroundColour field, then you can remove the field from the
layout.
You can change the colour at any time by pasting a new small square
into this field in the same way.
Next create another new field, this time a Calculation field (Container
result) which will be either empty or have the background colour
depending on whether the record is an "alternate" row or not.
Record_BackgroundColour Calculation (Container Result, Unstored)
= If(Mod(Status(CurrentRecordNumber), 2) = 0,
g_BackgroundColour,
"")
Make sure the storage option is set to "Do not store".
Using the Mod function we can set even rows / records to have the
background colour and odd rows / records to remain clear (these will
display whatever colour the report layout's Body part is set to use).
In FileMaker 7 and 8 the Status(CurrentRecordNumber) will be different,
probably something like Get(CurrentRecordNumber).
Put this field on the report layout, stretch it to cover the entire
Body part (making sure to stay inside the Body part boundaries). Click
on the field in Layout mode and set the Graphic option in the Format
menu to "Reduce or Enlarge" and turn off the "Maintain original
proportions" - then the small square will be enlarged to fill the
field. Finally move the field to the back of all the other fields via
the Arrange menu option.
View the report in Browse or Preview mode and ta-dah! :o)
Note:
Global fields lose their data if you do a Save As of the database using
the "Clone, no records" option. If you do that the small square is lost
and you'll need to re-paste a new one in.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
.
- Follow-Ups:
- Re: Alternate Background
- From: Howard Schlossberg
- Re: Alternate Background
- References:
- Alternate Background
- From: Yoyo
- Alternate Background
- Prev by Date: Re: [Ann] Do you suffer from Colornoma or Mismatchphobia?
- Next by Date: Re: [Ann] Do you suffer from Colornoma or Mismatchphobia?
- Previous by thread: Re: Alternate Background
- Next by thread: Re: Alternate Background
- Index(es):
Relevant Pages
|