5 Replies Latest reply on Jan 11, 2011 1:34 PM by philmodjunk

    Showing even empty subcategories

    njem

      Title

      Showing even empty subcategories

      Post

      I have MainTable, and a SubTable (contacts) that normally shows in a portal. I can make a report to show each person in the MainTable and show the contacts that go with them but I get one of two undesired reports. If I base it on MainTable it only shows the first contact. If I base it on the ContactTable then I get a line for each Contact but any person in MainTable who doesn't have any contacts doesn't show up in the report at all. If a person doesn't have any contacts I want it to show their name as a category header and show there are no contacts so we know that. Thanks.

        • 1. Re: Showing even empty subcategories
          philmodjunk

          Use the Main table and place a portal to the sub table in the body. Specify many more rows for this portal than you think is likely to be needed for the largest number of contacts. Use the Inspector to set this portal to slide up, resize enclosing part. Make sure that any layout objects, even graphic objects that are along side or below the field are also given the same settings. This will shrink the portal to just those rows that aren't empty when you print, preview or save as PDF. You will not see any change in browse mode.

          I can't really recommend it, but you could also create a single record related record in your sub table for every Main table record that does not have at least one contact. This record would be kept blank in every field except the key field that links it to main. Then your original summary report will be able to list every record from MainTable.

          • 2. Re: Showing even empty subcategories
            njem

            Perfect.

            A: I think I've looked through most of the help doc and some online tutorials and such. Am I missing some doc source that would have stuff like that?

            B: I was getting a wierd blank area at the bottom page. Seemed to be connected with making a portal 20 lines long (even though the sliding up was working correctly). In playing around I set the portal to 1 line, then back to 20, then the problem went away.

            C: Don't suppose there's any way for portal fields to be dynamic in size, in browse or preview? My portal is a contact note and a date of the note. Spreadsheets are pretty flexible about this kind of thing. They can make just the row you're on deeper to accept showing several lines of a cell with long text. Or if not that then at least some ellipsis or arrow at the end to indicate you're not seeing it all.

            • 3. Re: Showing even empty subcategories
              philmodjunk

              C: When you find you need to use sliding fields or portals, you often need to use two layouts--one for printing and one for browsing and editing. In the browse and edit layout, you can specify scroll bars on your portals and/or large text fields, then reduce the height to a more manageable size. On your print layout, you make them as tall as needed and set them to shrink.

              Often, developers use a print script attached to a button that switches layouts, prints and then switches back so that the user never even knows the other layout exists.

              • 4. Re: Showing even empty subcategories
                njem

                I meant the depth of a given line. Most contact notes fit in the width of the field but sometimes they need to put in so much text it would take a field box two or three times deeper than normal. If I make the individual portal line (browse or preview) that deep then they're all that deep and then the portal box has to be very tall in browse mode and in a report EVERY contact line (that is used) is that deep and so a list of five contact notes that used to fit in a vertical inch now needs 5 vertical inches with a lot of white space between. If I keep the portal line vertically short (one text line high) then if the text extends off the right there is no indication, no elipsis or arrow or visual cue for the reader that they're not seeing the whole note. In most spreadsheets (OpenOffice Calc, Excel) either you get a visual cue, an arrow or something, or just that one row gets deeper to display all the text in that cell. I'm guessing FM doesn't have that, something else for me to put in the suggestions.

                • 5. Re: Showing even empty subcategories
                  philmodjunk

                  This is one of the limits of sliding in a portal. You can resize the entire portal, but you can't resize an individual row within the portal. Frown