Re: Alternate Background



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)
.



Relevant Pages

  • Re: Report text box showing squares
    ... The layout preview doesn't rely on actual records and data. ... Now when I run the report one of the text boxes does not ... > the required text, it only shows a Square, 1 Square for each line of text. ... > checked the cross tab query and the cross tab query does the same thing. ...
    (microsoft.public.access.reports)
  • Re: SBS 2003 Server Usage Report
    ... the default layout of Usage Report is a little different ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: Access 2003 v/s Access 2007
    ... the access report writer was the gold standard by which all report writers ... However, I was doing layout, and was commenting to a co-worker how ... different pictures in a column in a continuous form now. ... applications that most of us developers just simply avoided because MS ...
    (comp.databases.ms-access)
  • Re: PDFSplitMerge - wierd !
    ... I will report this to Guangmingsoft but expect nothing since ... exe launched from Windows Explorer. ... Add Object cntSend As Container With; ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Access 2002 Report Wizard problem
    ... you can always install one of the "virtual PDF printers", ... Print or Layout preview, convert databases, or use the Datasheet Font ... I'm using Access 2002 and trying to create a report from a query, ...
    (microsoft.public.access.reports)