7 Replies Latest reply on Jun 7, 2013 8:33 AM by philmodjunk

    Shrinking text boxes



      Shrinking text boxes


           I have headers to a portal table that I want to shrink down when the portal is empty. I will have conditionals making the headers a white text so that you don't see them when printing.

           I was thinking that I could also put conditionals to make them point 1 font size and have the entire thing shrink so they slide up to have minimal blank space in my report.

           I can't figure out how to make the actual text boxes shrink with the font size; the font size gets smaller but the text boxes are still the same size so there's just as much blank space.

           Anyone have any ideas?


        • 1. Re: Shrinking text boxes

               You'd need to replace the layout text with one or more calculation fields that are empty if the portal is empty--same basic logic as your conditional format expression, but as part of an If function in the calculation. Then these calculation fields can be set to slide up and to resize the enclosing part.

               Key facts about sliding layout objects:

          1.           It's only visible in preview mode and when you print/save as PDF...
          3.           Sliding fields will shrink but not expand.
          5.           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.
          7.           Objects in headers and footers will not slide.
          9.           Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
          11.           Fields will slide up only if Top alignment is specified for it and will slide left only if Left alignment is specified.
          13.           Consistent side borders are difficult to achieve with sliding fields.
          • 2. Re: Shrinking text boxes


                 I've never used calculation fields. Can you break that down for me? I need text headings when there is data in the portal and no headings when there is no data in the portal.


            • 3. Re: Shrinking text boxes

                   Open Manage | Database | Fields and select your Layout's associated table.

                   Enter a new field name, select calcualtion as the field type and click Create.

                   Create a calculation similar to:

                   If ( not IsEmpty ( dailylog_turbidity_environmental::NeverEmptyField ) ; List ( "Daily" ; "Sequence" ) )

                   Select Text from the Result Type drop down.

                   Select a field that is never empty of data--such as the foreign key field used in the portal relationship in place of "neverEmptyField".

                   This calculation field will be empty when the portal is empty and display:


                   when it is not.

                   This assumes that your portal is not a filtered portal. If it is a filtered portal, you'd need to replicate the filter's logic in this if function.

              • 4. Re: Shrinking text boxes

                     That sounds good, but I have one problem before I can do it.

                     Under Manage, Database can't be selected. Only Security, Value Lists, Layouts, and Scripts can be. Is there a reason for this?

                • 5. Re: Shrinking text boxes

                       Could be you don't have the database open with a full access account.

                       Maybe a custom menu has disabled it.

                       Maybe there is a script running that is currently paused.

                       Maybe your file is damaged

                       All of these are just guesses on my part.

                  • 6. Re: Shrinking text boxes

                         I switched to the file's admin account, so now I'm good to go.

                         However, this keeps popping up as I'm trying to create the calculation.

                         I feel like I'm so close though!

                    • 7. Re: Shrinking text boxes

                           I used List as a quick way to get text to appear in two lines. If the text to be returned is all in a single line, you don't need the list function and can use this expression instead:

                           If ( Not IsEmpty ( dailylog_turbidity_environmental::Sample_ID ) ; "Environmental Turbidity Values" )