3 Replies Latest reply on Mar 9, 2012 8:14 AM by Nina_9ah

    Printing Multiple Portals: Hide Portals with No Rows


      I have to make a report which shows data from seven different form layouts, some of which consist of portals. I started by copying all seven layouts to a new multi-page layout. The problem is that a portal shows up on report even if it contains no rows.


      Is there a workaround?





        • 1. Re: Printing Multiple Portals: Hide Portals with No Rows

          Yep, if you select the portal in layout mode and check the "Sliding up based on: All objects above" and also select "Also resize enclosing part" it will take care of your problem. It doesn't resize the individual portal rows, but if a portal row is empty it will not show in preview mode.

          • 2. Re: Printing Multiple Portals: Hide Portals with No Rows



            When you say "even if it contains no rows", do you mean "even if there are no records in that portal"?  Otherwise, why would you add a portal with zero rows (I assume you meant data in those portals and not physcal rows)


            Are all the layouts you used to create the new layout from the same Table Occurrence?  As you know, a single layout (in this case your new one) is based on a single TO that you chose when you set up the layout, and if any of the portals or fields on that new layout are not based on the same TO (or one connected to it) you will not see data from those portal/fields.


            Also, when you look at all of the individual layouts with portals, do you see data in them? There is no easy way to conditionally format the portal itself to show/not show based on the presence of data in the portal.


            In general, if you are creating a report, it's better to report from the context of where that data lives. Otherwise how will you deal with instances where the portal on the layout has fewer rows than data if the portal needs to show all of the data you are reporting? 


            If your original layouts all show the data you expect to see, you may need to rethink combinging all the layouts. Instead a better way may be to create a script that generates PDFs from each layout [using the "Save as PDF" script step] and combine them all using the "Append to existing PDF" scrpt step option. There is a good article from SixFriedRice that shows you why and how to do this:







            • 3. Re: Printing Multiple Portals: Hide Portals with No Rows

              I had a similar problem trying to print a report with a portal of images that were stored in a related table. It worked great to show the correct number of pages for the amount of related images but I always had a blank page (basically the placeholder for one portal row) even if there were no related records. I tried everything and no luck! I ended up switching the entire report to the TO for the images. For you though....having 7 different data sources that is not a reasonable option. Irene's suggession is good to get the printing done but if you need to preview it all prior to printing, a temp table might be the way to go.