6 Replies Latest reply on Mar 30, 2012 1:43 PM by philmodjunk

    Field Variable Text Length Sliding/Printing Not Working

    VanessaAnne

      Title

      Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation

      Post

      Hello, 

      I have two issues currently:

      1.)  I have been trying to do the sliding/printing trick to get a field that has various lengths of text to print whatever length is appropriate for each record.  The layout is simple - 10 columns, 1 row for each body.  So I could have anywhere from 10 records on a page to 1 depending on how long the text in one of my fields ends up being. 

      For some reason I have been setting the field at different lengths, setting it up to slide/print, but nothing is working.  I have two layouts and have changed the field in each of them, but again nothing.  

      No idea what I am doing wrong.  Everyone else seems to get it working.  I am working off a Filemaker Pro 7. 

       

      2.)  What calculation would I need to enter if I was gathering data based on records that were added by week, and wanted to know the total amount of records that are added for just a week at a time? 

      So if I have 20 candy bars sold in week 1, 50 in week 2, etc., what calculation would I need to enter to get the result? 

       

      Thank you!

        • 1. Re: Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation
          philmodjunk

          1) exactly what have you tried? Sliding will shrink a field to fit the data in the field, but won't expand it.

          Also:

          1. It's only visible in preview mode and when you print/save as PDF...
          2. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
          3. Objects in headers and footers will not slide.
          4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
          5. Container fields will slide only if Top, Left alignment is specified for it in the data formatting section of the Inspector's data tab.
          6. Consistent side borders are difficult to achieve with sliding fields.

           

          2) There are several ways you can get such weekly counts. To start, you can define a calculation field as:

          Datefield - dayOfWeek ( dateField ) + 1

          and specify "date" as the return type.

          This calculation computes the date of the Sunday that falls on or precedes the date in dateField and thus gives all records in the same week a common value that can be used in sorting and also in relationships. (Please consider the implications for your data for weeks where Sunday falls in the last week of December and Saturday of the same week falls in the first week of January. This may or may not be desirable.)

          With such a field, you can sort your recors by this calculation field to group all records by week. Then a sub summary layout part "when sorted by" this calculation field can include a summary field to report the totals for that week. If you remove the body part of your layout, you can get a report where you have just one row of data for each week.

          You can also define a relationship that matches records by this field to compute weekly totals. Sum and other aggregate functions can compute totals, averages, etc for the related record and you can still use summary fields defined in the related table to compute the same values.

          Either approach can work for you, but are implemented with different layout designs so you'll need to evaluate the design of your system and how you need to access these weekly totals in order to decide which approach works best for you.

          • 2. Re: Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation
            VanessaAnne

            1.)  I've tested making the field much longer than I'll ever need it, and created test records with different lengths to see how sliding will affect them, but the result isn't different at all.  It's as if I never clicked the sliding option at all.  

            Every time I make a change I check it in preview mode, not browse mode.  I've selected all the fields in the layout to make sure they are clicked to slide.  And ensure that none of the layouts are overlapping.  

            Attached is a screen grab of the layout.  It's very simple.  The column on the far right is what I'm trying to change in size based on text length. 

            • 3. Re: Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation
              philmodjunk

              If you mean the field without borders that containes testtesttest... in the first row, it appears to be working correctly. The first three records show a field that is two rows tall the last two (with test and test 2 in this field), show one row borders.

              Column 7, on the other hand, appears either not to be set to slide or is not at least two rows of text in height, but that's not the "column on the far right".

              If you wanted all the fields in in the last row to adjust to the same height--two rows, that's not how sliding works, unfortunately. Best Compromise solution is to not have visible field borders so that this difference in field heights is not obvious. You can place horizontal lines on your layout to create top and bottom borders, but simple "white space" is the most attractive option for the side borders. (see item 6 in my last post) Side borders can be done, but they don't look all that great as you end up with lines that extend a few pixels below where they should on the last row of records.

              • 4. Re: Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation
                VanessaAnne

                Thank you.  It's such a bummer not all fields conform to the longest fields size.  I'm trying to make it look better but nothing seems right.  Oh well.  Thanks again!

                • 5. Re: Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation
                  philmodjunk

                  This is the best I can do. I've add two horizontal lines, one at the lowest possible position to still be in the header and one just below the limits of the sliding field. It's also set to slide up and resize the enclosing part.

                  • 6. Re: Field Variable Text Length Sliding/Printing Not Working & Weekly Number Count Calculation
                    philmodjunk

                    It used to be possible to add a vertical line, positioned so that it's top end is even with the top pixel of the body and its bottom end extends one pixel out of the body and into the footer or trailing grand summary. But when I try that with Filemaker 11 on Windows, I get: