7 Replies Latest reply on Apr 19, 2010 6:37 AM by Mystick

    Change width of a field on a print layout depending on whether the adjacent portal is empty

    jbrodgersky

      Title

      Change width of a field on a print layout depending on whether the adjacent portal is empty

      Post

      I have an exam question database in which some questions have associated images. The images are in container fields in a portal (because there may be several images associated with a question). But some questions do not have images. I need to have the text field containing the question (on the left side of the page) be either narrow (if there's an image in the portal on the right), or the full width of the page (if the image portal is empty). It seems logical that the Format/Set Sliding and Printing menu should enable me to do this, but I haven't had any luck so far. Or, it seems logical that FileMaker should have a formula I could combine with an If statement to set the width of the question field at one of two widths. But I can't find one as yet. Can anybody advise?

       

      The databases are hosted on just one computer, and I don't use IWP. I also don't use Web Viewer fields because they don't work in portals.

        • 1. Re: Change width of a field on a print layout depending on whether the adjacent portal is empty
          Mystick

          what I would do....  :

           

          create yourself a new section in the report based on a field of the portal (images)

           

          inside this section, put the narrow question + image portal

           

          inside a question section, put only the full width question field. Inside the conditionnal formatting, change the font size to 1 and color to same as background if images exists.

           

          add the sliding options everywhere..

           

          so if there are images for a question, it will only show the image section question because there is image data so the section will be there and the question only section will be hidden by conditional formatting.

          if there is no image, the image section will not be there and the question section will appear.

          then you can have your both question formats on the same report... i know it is sad there is no way to be easier... *i'm dreaming of a visible/hide function on each fields*

           

          hope this helps

          • 2. Re: Change width of a field on a print layout depending on whether the adjacent portal is empty
            philmodjunk

            Do you need to see this format change in browse mode or just when printed and/or previewed?

             

            Sliding options do not affect how the layout displays data if you are in browse mode, it's strictly a format option for printing/previewing your data.

            • 3. Re: Change width of a field on a print layout depending on whether the adjacent portal is empty
              jbrodgersky

              I'm not sure what you mean by "adding a section based on a field of the portal" but I suspect that part is critical. If I just extend the length of the body and copy the Question field down below the original narrow-version Question next to the portal, every question is printed twice (and there's a blank page between every question because of the length of the Body). 

               

              The portal comes from a linked database called Images, and I need to print just the appropriate set of questions, so the Questions database is what the layout is based upon.

               

              I think your solution may work if I can just get the details right!

               

               

              • 5. Re: Change width of a field on a print layout depending on whether the adjacent portal is empty
                Mystick

                I'm not sure what you mean by "adding a section based on a field of the portal"...

                 

                Ok...  let's say you have a table called QUESTIONS and another table called IMAGES, both linked together in your relationship graph...

                 

                When you create the report, in the part setup, create a sub-summary when sorted by a field from the IMAGES table. that's what I meant by "section based on a field of the portal"... :)

                 

                Inside this sub-summary put the narrow question field and the images portal + sliding.

                This sub-summary section will appear on  the printed report only if there is data for this IMAGES field.

                 

                then create another sub-summary based on a field from the QUESTIONS table.  inside this one, put the wider question field + conditionnal formating + sliding like I said in my other post.

                 

                you will not use the body part.

                • 6. Re: Change width of a field on a print layout depending on whether the adjacent portal is empty
                  jbrodgersky

                  Hi Mystick,

                  Thanks so much for helping. I've got the two subsummaries set up now, and it properly displays the question in one or the other, but it still displays the portal section even if it's empty. I can't apply conditional formatting to the portal, only to the fields in it. I've fiddled with the sliding and printing setup, but no luck. All the fields are set to slide up based on all above, and reduce the size of the enclosing part.

                   

                  And in addition, if there are several questions in a row without images, it's not printing them on the same page-- it just prints the current question, and then goes on to a new page. This might fix itself if I can get the subsummary with the image portal to shrink properly, but even if I make the fields really small, it still isn't printing multiple questions on one page.

                   

                  Aargh! So close, yet so far away...

                   

                   

                  • 7. Re: Change width of a field on a print layout depending on whether the adjacent portal is empty
                    Mystick

                    maybe I forgot to say that you have to sort your report on same fields used for creating the parts, in the same order.

                    So you sort on field from IMAGES and then on field from QUESTIONS.

                     

                    the parts hide or show themselves correctly only after the sort have been applied.

                     

                    be sure to do the sorting in the same fields that was used for creating the sub-summaries part ! :)