dbTalk Databases Forums  

Sliding problem

comp.databases.filemaker comp.databases.filemaker


Discuss Sliding problem in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
anderst@gmail.com
 
Posts: n/a

Default Sliding problem - 11-18-2006 , 03:33 PM






Hi all!

I've got an input layout with the possibility to make a quotation with
up to ten products (with an extra field for more information on that
particular product).

Now, in the layout for printing the quotation I've tried to make
everything slide, so that when there's only two products I want to end
up with only one page. My problem is that the two last fields (for
additional text about the whole quotation, and a field with a "Looking
forward to your reply" text) will start at the bottom of the page and
end on a second page, no matter how few products there are on the page.

I've tried so many different approaches trying to solve this problem
that it's getting extremely frustrating.

Any suggestions/tips/ideas are welcome!

cheers
Anders

FileMaker 5.5, Mac OS X 10.4.8


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

Default Re: Sliding problem - 11-18-2006 , 06:55 PM






In article <1163885633.759015.39900 (AT) m73g2000cwd (DOT) googlegroups.com>,
anderst (AT) gmail (DOT) com wrote:

Quote:
Hi all!

I've got an input layout with the possibility to make a quotation with
up to ten products (with an extra field for more information on that
particular product).

Now, in the layout for printing the quotation I've tried to make
everything slide, so that when there's only two products I want to end
up with only one page. My problem is that the two last fields (for
additional text about the whole quotation, and a field with a "Looking
forward to your reply" text) will start at the bottom of the page and
end on a second page, no matter how few products there are on the page.

I've tried so many different approaches trying to solve this problem
that it's getting extremely frustrating.

Any suggestions/tips/ideas are welcome!

cheers
Anders

FileMaker 5.5, Mac OS X 10.4.8
Make sure you select ALL the fields and ALL the objects (boxes, lines,
etc.) that may need to slide upwards. This includes the fields you want
to slide underneath.

For example, if you have the fields:

[Name]
[Address1]
[Address2]
[Address3]
[City]

and you want City to slide up removing any blank address lines in
Address2 and Address3, then all three fields need to be set to slide up
(City, Address2 and Address3). The sliding up will be stopped by
Address1 since that not set to slide.

If the problem fields are in another Layout Part (eg. a Summary), then
also make sure the Slide Up options are set to shrink the enclosing
Part as well.

Sliding is a little cumbersome to set-up, but it does work ... except
for Portals and boxes - these will slide upwards, but they will not
actually shrink in their vertical height (or horizontal width when
sliding left) like normal fields do.

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


Reply With Quote
  #3  
Old   
anderst@gmail.com
 
Posts: n/a

Default Re: Sliding problem - 11-18-2006 , 08:50 PM



Quote:
Make sure you select ALL the fields and ALL the objects (boxes, lines,
etc.) that may need to slide upwards. This includes the fields you want
to slide underneath.

For example, if you have the fields:

[Name]
[Address1]
[Address2]
[Address3]
[City]

and you want City to slide up removing any blank address lines in
Address2 and Address3, then all three fields need to be set to slide up
(City, Address2 and Address3). The sliding up will be stopped by
Address1 since that not set to slide.

If the problem fields are in another Layout Part (eg. a Summary), then
also make sure the Slide Up options are set to shrink the enclosing
Part as well.

Sliding is a little cumbersome to set-up, but it does work ... except
for Portals and boxes - these will slide upwards, but they will not
actually shrink in their vertical height (or horizontal width when
sliding left) like normal fields do.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)
Well I've got everything covered (and I've even tried a gazillion
combinations of sliding on the various fields) but it still will not
work properly. No matter what I try it will put the two fields at the
bottom at the first page and the top of the second. And no, there are
no Portals or boxes.

Please keep those suggestions coming!
Anders



Reply With Quote
  #4  
Old   
eyebrown@mindspring.com
 
Posts: n/a

Default Re: Sliding problem - 11-19-2006 , 09:13 AM



In article <1163904615.546452.28730 (AT) k70g2000cwa (DOT) googlegroups.com>,
anderst (AT) gmail (DOT) com wrote:

Quote:
Well I've got everything covered (and I've even tried a gazillion
combinations of sliding on the various fields) but it still will not
work properly. No matter what I try it will put the two fields at the
bottom at the first page and the top of the second. And no, there are
no Portals or boxes.
I presume you have at least two related files. One is a header file with
customer name & address, etc. The other is a line-item file with your
quoted items. If so, then it sounds like your print layout is in your
line-item file (the most common situation) and you have set up header,
footer and subsummary parts to hold the print info you are trying to
slide.

I had a similar situation involving a complex packing slip layout that
could contain anywhere from one to fifty line items. I wrestled with
sliding problems for a long time. Then I gave up and designed the print
layout in the header file instead of line-item, with a "standard" layout,
not a list layout.

Then I made a portal to hold my line items. This made layout very easy,
no matter how complex, and mine is pretty complex. As you say you only
quote up to a maximum of ten items, this might work for you.

I came up with a clumsy workaround to imitate sliding behavior without
actually using sliding (due to the unslidable portal). Here's how:

Design your layout in the header file the way you want it and include a
portal based on your primary line-item relationship defined to have just
one row. Place in this row all the line-item fields.

Once the layout is exactly the way you want it, duplicate the layout &
call it Print2 or something. Redefine your portal to have two rows
instead of one & move your layout elements to accommodate the larger-sized
portal.

Duplicate again & call it Print3, redefine the portal to be three rows,
etc. until you have a layout that will account for every possibility.

The page two problem can also be accounted for. Figure out at what point
the number of quotes will exceed a single page. In my example, you need a
two-page quote for quotes of seven items or more. Make a single Print7_10
layout to use as the Page One of the four two-page possibilities.

Make a Page Two layout for each. I assume your quoted items appear in
some order, alphabetical, for example. The relationship that defines the
portal on your page one layouts should be set to sort by whichever field
will control the sequence.

Over in the line-item file, make three new fields. One is a calculation
field called "Constant", where the calculation is simply the number one.
Then make a number field, call it Page2_Control. Now make a calculation
field to be used as a key field for the page two print relationship, call
it Page2_Key. This field will be empty if the Page2_Control field is
empty, otherwise it will hold your primary key, your invoice number, quote
number, order number. Here's the calculation:

Case ( IsEmpty (Page2_Control), "", QuoteNumber)

Go back to your header file and define a new relationship between header
and line-item, linked by QuoteNbr to Page2_Key, defined to sort on the
same field as you main relationship.

On the page two layouts you made for your four multi-page possibilities,
alter the portal definition to be based on this new relationship. Make
sure all fields placed on the portal rows are also selected using the new
relationship.

Now make a script to switch between layouts, depending on number of items
in the quote by testing for the sum of the constant calc field you made in
line-items:

If (Sum(LineItem::Constant) = 1)
Go to Layout (Print1)
Print
EndIf
If (Sum(LineItem::Constant) = 2)
Go to Layout (Print2)
Print
EndIf

etc.

The tricky part is when you get one requiring a multipage layout. What
you need to do at that point is run an external script in your line-item
file that will set that Page2_Control flag for the line-items that need to
be printed on page two. This script will assume a found set of all line
items associated with the quote being printed. Make a line-item working
layout that includes the Page2_Control flag (which must be present on an
active layout during the script). Make a script (call it SetControl) in
the line-item file like:

Sort (Same field as original portal sort for single-page layouts)
Go to Record/Request (First)
Omit Multiple (No Dialog, 6)
Replace (No Dialog, "Page2_Control", 1)

The Replace step is a replace-with-calculation, where the calc is a one.

Now, back in the primary print-layout controlling script as above, make
your seven through ten tests:

If (Sum(LineItem::Constant) = 7)
Go to Layout (Print7_10)
Print
Go to Related Record (Show, "Line_Item Relationship")
Perform Script (Subscripts, External: "SetControl")
Go to Layout (Print7_Page2)
Print
EndI8
If (Sum(LineItem::Constant) = 7)
Go to Layout (Print7_10)
Print
Go to Related Record (Show, "Line_Item Relationship")
Perform Script (Subscripts, External: "SetControl")
Go to Layout (Print8_Page2)
Print
EndIf

etc.

If done right, the page 2 portals will only display the quotes in the
sorted sequence beginning with item #7 and up.

This is, as you can see, a bit of a pain to set up, but once it's running,
the user never sees any of this, just a stream of quotes coming out of the
printer.

Using this technique, I print up to 200 packing slips, mixed single and
multiple pages, with line items ranging from one to about fifty, in a
single pass. It's been working flawlessly fgor two years.

If this is the way you want to go, feel free to ask me to expand on any of
this. Please do not email me directly, as this address will reject all
outside email.

Steve Brown


Reply With Quote
  #5  
Old   
Ursus
 
Posts: n/a

Default Re: Sliding problem - 11-19-2006 , 02:15 PM



In addition to all that has been said, make sure to NO object is over, or
even on a line between parts. Even a one pixel overlay somewhere could
disturb the sliding. ALL objects have to be within the body.

Ursus

<anderst (AT) gmail (DOT) com> schreef in bericht
news:1163885633.759015.39900 (AT) m73g2000cwd (DOT) googlegroups.com...
Quote:
Hi all!

I've got an input layout with the possibility to make a quotation with
up to ten products (with an extra field for more information on that
particular product).

Now, in the layout for printing the quotation I've tried to make
everything slide, so that when there's only two products I want to end
up with only one page. My problem is that the two last fields (for
additional text about the whole quotation, and a field with a "Looking
forward to your reply" text) will start at the bottom of the page and
end on a second page, no matter how few products there are on the page.

I've tried so many different approaches trying to solve this problem
that it's getting extremely frustrating.

Any suggestions/tips/ideas are welcome!

cheers
Anders

FileMaker 5.5, Mac OS X 10.4.8




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.