dbTalk Databases Forums  

Alternate Background

comp.databases.filemaker comp.databases.filemaker


Discuss Alternate Background in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Yoyo
 
Posts: n/a

Default Alternate Background - 12-13-2005 , 08:47 AM






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.

Yoyo


Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Alternate Background - 12-13-2005 , 09:42 AM






You could have a row number and a field filled with a color (pseudo code
: Case( nb = odd, color, "")). You make that field transparent and put
it on the top of your row in layout mode.
Remi-Noel

"Yoyo" <pengxian (AT) gmail (DOT) com> a écrit dans le message de news:
1134485245.043499.230770 (AT) z14g20...oglegroups.com...
Quote:
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.

Yoyo




Reply With Quote
  #3  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Alternate Background - 12-13-2005 , 11:27 PM



In article <1134485245.043499.230770 (AT) z14g2000cwz (DOT) googlegroups.com>,
"Yoyo" <pengxian (AT) gmail (DOT) com> wrote:

Quote:
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! )


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)


Reply With Quote
  #4  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Alternate Background - 12-14-2005 , 01:16 AM



Helpful Harry wrote:
Quote:
In article <1134485245.043499.230770 (AT) z14g2000cwz (DOT) googlegroups.com>,
"Yoyo" <pengxian (AT) gmail (DOT) com> 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.

In FileMaker 7 and 8 the Status(CurrentRecordNumber) will be different,
probably something like Get(CurrentRecordNumber).
In FIleMaker 7/8, none of this trickery is necessary. Just double-click
on the body part (or in layout mode go to the Layouts menu > Part Setup,
click on 'body' and 'change'. Either way, just click on 'alternate
background fill' and select your color.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #5  
Old   
Michael Paine
 
Posts: n/a

Default Re: Alternate Background - 12-14-2005 , 05:04 AM



It seems that "Alternate Background Fill" only works in FM8 if you
select View as List or View as Table before going to Preview Mode.
Michael Paine

Howard Schlossberg wrote:
Quote:
Helpful Harry wrote:

In article <1134485245.043499.230770 (AT) z14g2000cwz (DOT) googlegroups.com>,
"Yoyo" <pengxian (AT) gmail (DOT) com> 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.

In FileMaker 7 and 8 the Status(CurrentRecordNumber) will be different,
probably something like Get(CurrentRecordNumber).


In FIleMaker 7/8, none of this trickery is necessary. Just double-click
on the body part (or in layout mode go to the Layouts menu > Part Setup,
click on 'body' and 'change'. Either way, just click on 'alternate
background fill' and select your color.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance

Reply With Quote
  #6  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Alternate Background - 12-14-2005 , 10:23 AM



Michael Paine wrote:
Quote:
It seems that "Alternate Background Fill" only works in FM8 if you
select View as List or View as Table before going to Preview Mode.
Michael Paine
Right...isn't that what the original post was asking?

"I want to create one report in preview mode, and I'd like to print the
rows with alternate background like portal."


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #7  
Old   
Michael Paine
 
Posts: n/a

Default Re: Alternate Background - 12-14-2005 , 01:44 PM



Ah - except that if I first view the layout in Form mode and then switch
to Preview the stripes dont appear. In other words, script should
include View as List before Preview (see below). View as Form does not
print stripes. View as Table does not format correctly.

Michael Paine

View As [ View as List ]
Enter Preview Mode
Print Setup [ Orientation: Portrait; P[ Restore; No dialog ]
....


Howard Schlossberg wrote:
Quote:
Michael Paine wrote:

It seems that "Alternate Background Fill" only works in FM8 if you
select View as List or View as Table before going to Preview Mode.
Michael Paine


Right...isn't that what the original post was asking?

"I want to create one report in preview mode, and I'd like to print the
rows with alternate background like portal."


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance

Reply With Quote
  #8  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Alternate Background - 12-14-2005 , 02:56 PM



Now would 'view as form' print as a list report. One goes with the other.

Michael Paine wrote:
Quote:
Ah - except that if I first view the layout in Form mode and then switch
to Preview the stripes dont appear. In other words, script should
include View as List before Preview (see below). View as Form does not
print stripes. View as Table does not format correctly.

Michael Paine

View As [ View as List ]
Enter Preview Mode
Print Setup [ Orientation: Portrait; P[ Restore; No dialog ]
...


Howard Schlossberg wrote:
Michael Paine wrote:

It seems that "Alternate Background Fill" only works in FM8 if you
select View as List or View as Table before going to Preview Mode.
Michael Paine


Right...isn't that what the original post was asking?

"I want to create one report in preview mode, and I'd like to print
the rows with alternate background like portal."


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #9  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Alternate Background - 12-14-2005 , 09:10 PM



In article <11q11n5smnsi387 (AT) corp (DOT) supernews.com>, Howard Schlossberg
<howard (AT) antispahm (DOT) fmprosolutions.com> wrote:

Quote:
Now would 'view as form' print as a list report. One goes with the other.
Sometimes a "form" layout is printed as a "list" report (and not only
by accident), but not often. )

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #10  
Old   
Yoyo
 
Posts: n/a

Default Re: Alternate Background - 12-15-2005 , 09:53 AM



it seems that we need to upgrade to FM8,

Our current version is FM6, last time, we try to upgrade to FM7, there
are some errors which prevent us from upgrading.

Thanks all for replying


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.