3 Replies Latest reply on Apr 1, 2011 1:08 PM by philmodjunk

    Help with Layout

    MatthewMackay

      Title

      Help with Layout

      Post

      Hi, I'm trying to create a report layout in the following format. I need the item field to to reduce or enlarge based on the length of 2 other fields + 2 container fields, creating a columnar layout.

      I've been trying to use calcfields but don't think I'm getting it quite right. The screenshot is just a mock up which wouldn't work with varying field contents. The container fields will always be the same size. 

      Cheers

      Screen_shot_2011-03-29_at_20.36.18.png

        • 1. Re: Help with Layout
          GianandreaGattinoni

          As far as I know, you cannot change the size of the fields at run time.

          What you can do, it is to use the sliding proprieties when you design your layout. So if you make your fields big enough, FM when you print, reduce the size of the objects (left or up).

          But, if I have understood correctly your problem, this is not the solution or it is just in part.

          Another solution could be to produce more layouts, as templates and, depending on your calculations, to use the one that fit most.

          • 2. Re: Help with Layout
            MatthewMackay

            At the moment, I have the 3 fields, "Item", "Description" and "Comments".

            The "Item" field is transparent with an identical calcfield behind that resizes based on the other fields.

            The calculation being;

            Let ([
            Litem =Length (Item);
            LDescrip = Length (Description);
            LComments = Length (Comments)
            ];

            Case (Litem ≥ LDescrip and Litem ≥ LComments, Item;
            LDescrip ≥ Litem and LDescrip ≥ LComments, Description;
            Comments)
            )

            Perhaps this could be modified to add in the length of the container fields with a border?

            Any suggestions will be appreciated.

            • 3. Re: Help with Layout
              philmodjunk

              Items can vary in length when you print, preview, or pdf the layout. They cannot while in browse mode. If you want the lengths to vary when printing, etc. Use sliding to set the fields to slide up. You can't set the Item field to match the combined length of the other fields, but you can put it on the layout without any visible borders and then set the body part background to be blue and it will look like it does.

              A length calculation on a text field doesn't help very much as different characters are different widths unless you specify a mono spaced font like courier which looks pretty ugly in most cases.