4 Replies Latest reply on Apr 5, 2009 2:15 PM by Orlando

    Empty Portal Rows - Hiding Lines

    DrDave

      Title

      Empty Portal Rows - Hiding Lines

      Post

      I have created a layout (cover letter) that contains a portal into a related database. The portal can accommodate up to 9 rows because I know at least one person has 9 items to be listed. 

       

      The problem is that if you don't have nine items, there are empty rows in the portal...always at the bottom of the portal because I sort the portal by ItemNumber. As a result, this is not an issue that Format-Sliding will take care of.

       

      Is there something that I can do to not display the empty rows in the portal? I was hoping that I could turn the portal gridlines off, but there is no option for that.

       

      Thank you for any and all suggestions. 

        • 1. Re: Empty Portal Rows - Hiding Lines
          Orlando
            

          Hi DrDave

           

          You should be able to make the Portal itself invisible by the fill and line palettes in the status bar on the left in Layout Mode. Making the background the same as your layout using the Fill Colour palette, and changing the Line Width to "None", or the same colour as your background.

           

          I hope this helps.

          • 2. Re: Empty Portal Rows - Hiding Lines
            DrDave
              

            Orlando,

             

            Yeaaaaaa. I never realized (newbie! :-)) that you could turn off the lines like that.

             

            Thank you.

            • 3. Re: Empty Portal Rows - Hiding Lines
              trialuser1111
                

              Orlando,

               

              I am working with a similar problem, but I would prefer not to make the Portal rows transparent/invisible, since our format employs the alternate background fill striping method.  Is there a way to actually hide these empty rows (mine always appear at the bottom as well) or do I just need to break from our usual format? 

              • 4. Re: Empty Portal Rows - Hiding Lines
                Orlando
                  

                Hi trialuser1111,

                 

                The only way I can think to do this with alternate backgrounds is to use conditional formatting and a summary field in the child table.

                 

                So start with creating a summary field in the child record, I am going to call it sumCount and it needs to be set to be a Summary field and in the 'Option for Summary Field' dialog you need to specify the ParentID field that you ise as the key, adn choose 'Count of' from the options on the left and also tick the option for 'Running count'.

                 

                Now you need to apply some layout tricks to the portal to have the field you are displaying, or a text object in the background, to have a conditional format applied to give you an alternating background effect.

                 

                First off you need to set the field or object to be a specific measurement in relation to your portal, it needs to be the same hight as a single row of the portal and 2 pixels shorter width wise that the portal, so if a single row or your portal was 349 by 17 pixels your field or text object will need to be 347 by 17 pixels.

                 

                For the above if your portal is just displaying a single field from the child record then you can do this with a field, otherwise a good trick is to select your text object tool and click onto the layout and input a single space with the space bar and then resize the blank text area as described above.

                 

                Now give the object a border to match your current style for the portal.

                 

                Now you can apply the conditional formatting to the field/object, go 'Format > Conditional...' and when the dialog appears click 'Add' and for the 'Condition' options specify 'Formula is' and input the following

                 

                Mod ( CHILD TABLE::sumCount ; 2 ) 

                 

                Then specify the 'Fill Colour' you require for the fill of all your odd portal rows. then click 'OK' 

                 

                Now place the field/object over the portal and position it so it is 1 pixel to the right and 1 pixel down from the top left of the portal, this will position the bottom of the field/object outside of the portal row by 1 pixel but this what you want.

                 

                Now make the portal invisible as described in my original portal and go into browse mode.

                 

                This should now give you the appearance of a list of related record with an alternate background colour that is only as long as the content.

                 

                I hope I have explained this well enough, but if I am unclear about anything then let me know an I will clarify.