7 Replies Latest reply on Feb 5, 2012 12:02 PM by GuyStevens






      Can you please help, I have created a Portal that contains the fields that I need to be printed on a report but when printing reports the report may contain one or many lines how do I set a portal to automatically print only lines that contain information at present I have to select the number of rows.

        • 1. Re: Portal

          I never use portals to print rapports, but could it be that you need to set the portal so that it had no borders and no background (so that it becomes invisible).

          Then you give the fields borders.

          What you could also do is base your reprort on the table that contains your portal data and create a narrow body the height of one field.

          That will fill up with however many records there are and print those. You can set up borders etc on the fields.

          I attached an example screenshot.

          It's the first page of an invoice and as you can see there are all kinds of related data from other tables there, like customer invormation, invoice information etc.

          The report however is based on the table that contains the portal data ("invoicedetail" if you will)

          • 2. Re: Portal

            Here's a demo file that uses the method Guy Stevens describes: http://fmforums.com/forum/showpost.php?post/309136/

            You can also set a portal to slide up, resize enclosing part. It's not as flexible, so like Guy, I rarely use this option. You set up a layout where the portal has many more rows than you expect to use and thens specify the sliding otpions in the Inspector on the position tab. It shrinks your portal and does not expand it so if you get more rows than this portal with many rows, you still have a problem.

            Key facts about sliding layout objects:

            1. It's only visible in preview mode and when you print/save as PDF...
            2. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
            3. Objects in headers and footers will not slide.
            4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
            5. Container fields will slide only if Top, Left alignment is specified for it in the data formatting section of the Inspector's data tab.
            6. Consistent side borders are difficult to achieve with sliding fields.
            • 3. Re: Portal

              Thanks for your reply, I still don’t understand, I thought you had to use portal.


              What I have is a customer site that has a number of products that are made up using various fields as each product contains size, type, location exc. The products are linked to site by site ID each product has its on ID so and is permanently attached to one site, I need to be able to print service sheets for each month that will include several sites and each report will contain products that my be only one on site or may run in to hundreds.


              So I need to list the products for each site showing all the information of each product, site address exc.


              What would you suggest please.


              Thank you.

              • 4. Re: Portal

                How do you determine what goes on the report?

                I think you are already good with the tables TblSites and TblProducts.

                Next we need to know more about the way you make up a report.

                In the TblSites you would put:

                SiteInformation ...

                In TblProducts:

                SiteIdFk (this is related to SiteId in TblSites)
                Location ...


                Then you'll need a third table to determine what you'll put on your report. And maybe a Report Detail table. that you add as a portal to your layout.

                Then you make your report based on this Report Detail table.

                Question: When you put a site on your report, do you print all products? Or just some?

                Tell me more about what you are trying to make and I'd be happy to make an example file for you.

                • 5. Re: Portal

                  Each site has an ID, this is used to attach the site to the report, each product has an ID, and each product is attached to site by using the site ID, I created a report and used a portal to attach the products to the site but with portals you need to specify how many lines are ended as each site have different amounts of products it is not practical to keep changing the amount of lines.


                  I have attached the report below.


                  Thank you for your help


                  • 6. Re: Portal

                    I'm sorry, I don't see an attachement.


                    Also, what is there on your report?

                    Is is a list of all the sites and all the products? Or is it just a selection?
                    Is it maybe only certain sites but with all products, or all sites with certain products?

                    And if so, how do you make that selection?

                    • 7. Re: Portal

                      With the information at hand I made a very simple little example.

                      There are other ways to do this and far more advanced ways that give you more control. But maybe the best way to understand the idea is to start with a very simple example: