10 Replies Latest reply on Apr 16, 2014 11:19 AM by BryanN

    Printing Layout with multiple portals, sliding

    BryanN

      Title

      Printing Layout with multiple portals, sliding & hiding.

      Post

           Background info:

             
      •           Tables           
                         
        •                     Test reports (partent) containing general info about the equipment with fields from the customer info
        •                
        •                     Tests (child) There are multiple types of tests, as man as 4 or 5 per test report 
        •           
             

           So basically how I have this working (successfully with 1 pages test reports) is the data entry layout contains multiple portals for the various tests for the piece of equipment.  Lets say 5 types of tests each (though it varies and some aren't always used, hence using a child table via a portal so no fields go wasted)

            

           Working on the printout for this particular one, results in multiple pages of information that would have to go in the report.  The way I'm structuring it is that if there is data entered in certain key fields of the related child table, those values will show up in the printout.  If they don't exist, that portal is hidden from the printout and everything slides up.  That way, the customer only gets a test report with tests we actually perform and no blank fields from tests we did not.

            

           The issue I'm having is that no matter what way I arrange them in the layout, there are times that portals are getting cut off at the break (due to them sliding up) before the footer and show up partly on one page, and part on another.  

            

           What I am looking for is a way to be able to make sure that when they slide, they only slide if the entire portal object can fit on the page and if it can't, then it will start a new page.  

            

           Is that possible?   I've attached a screen shot of an example how I set up the print layout.  Being that there are multiple tables involved, I chose the Form View only as List View won't work with multiple child tables and I've formatted the portals so they only show 1 record's worth of information (that's all there will be) correctly.

      Screen_Shot_2014-04-15_at_12.43.06_PM.png

        • 1. Re: Printing Layout with multiple portals, sliding & hiding.
          philmodjunk

               It's not clear to me why you need a different portal for each test if this info is all being recorded in the same Tests table. Or do you have one table of tests for each type of test that might be performed?

               When I look at your screen shot, it's not immediately obvious that you have any portals on that layout...

               If you have a single tests table, it might be much simpler to set up a summary report based on tests that includes fields from Test reports. You can pull up a found set of tests records for a single test report on such a layout and sort your records to group them by individual test. Data specific to each test can be put in a sub summary layout part with details from each tests record grouped under that sub summary layout sub heading.

          • 2. Re: Printing Layout with multiple portals, sliding & hiding.
            BryanN

                 The reason I have a Test Reports table (which has basic info on the equipment) and a table for each kind of test is because some tests could have 30-40 fields and having a single table to cover all fields would result in a table with hundreds of fields - many not being used depending on the type of equipment.  Doing it this way keeps the user only creating related records in child tables if they actually have test data to enter.

                  

                 All of those enclosing boxes around the tests are the borders to the portal.  I'm defining the portals to show just 1 record (that's all there would be anyways).

                  

                 What's happening is if one of the portals/tests are hidden due to no data being entered, the others will slide up (that's what I want).  However, sometimes the slides result in the portal/test being cut up between 2 pages.  I'll attach another screen show to show that. 

            • 3. Re: Printing Layout with multiple portals, sliding & hiding.
              BryanN

                   The second half to that image/report

              • 4. Re: Printing Layout with multiple portals, sliding & hiding.
                BryanN

                     Hoping that makes sense.  Just looking for a way to ensure that sliding doesn't cut off any objects between 2 pages

                • 5. Re: Printing Layout with multiple portals, sliding & hiding.
                  philmodjunk

                       Well I didn't suggest that you shouldn't have multiple tables for your tests. I just asked for clarification as to whether or not this was the case or not. I then described a possible approach if you had a single tests table.

                       

                            All of those enclosing boxes around the tests are the borders to the portal.

                       But if your portal is set to display only one related record, you don't need the portal, just the fields from the related table unless the portal is filtered in order to show the correct record.

                       What I saw on your first layout only showed single records in what might or might not be portals. That doesn't mean that your portals are "wrong" or won't work, it's just an unneeded complication in your layout design.

                       

                            What I am looking for is a way to be able to make sure that when they slide, they only slide if the entire portal object can fit on the page and if it can't, then it will start a new page.

                       You can't selectively turn sliding on and off. So you may have to go the extra 50 miles and create several different versions of this layout and set up a script that selects the layout that is the best "fit" for a given combination of specified tests.

                        

                  • 6. Re: Printing Layout with multiple portals, sliding & hiding.
                    BryanN

                         Understood.  Thanks for the heads up about the portals - kinda forgot that I was being redundant with those as yes, in about 99% of the reports I'm making, there should only be 1 child record from each portal.

                         The only reason I had to do portals in one of the layouts is that for a specific piece of equipment, you do the same type of test 3 times but on different parts of the equipment.  Rather than make 3 separate tables (for each occurrence of the test), I have my portals set up so that for each portal object in the layout;  portal 1 only shows line 1, the second only shows line 2 and the third only shows line 3.  

                         One question I have about that is while I have nothing built in for the user to re-sort the portal values of that test, am I in danger of potentially having the wrong information show should a user (or admin) go in an perform a sort of those values at some point?  Hopefully I'm making sense with that one.  Basically, If portal 1 enters data into portal line 1, portal 2 enters data into line 2 and portal 3, line 3, is there any danger of line 3 showing up in portal 1, line 2 showing up in portal 3 or some permutation of that?

                         As for the print layout, I figured the 50 miles might be the answer.  It's not THE answer I want, but it's AN answer smiley.  I may just skip the section/portal hiding and just create a static report for this one.

                    • 7. Re: Printing Layout with multiple portals, sliding & hiding.
                      philmodjunk

                           Re-sorting records in a portal is not a built in feature. You cannot re-sort the values shown in a portal unless you go to a good deal of trouble to specifically design and script to add that capability.

                      • 8. Re: Printing Layout with multiple portals, sliding & hiding.
                        BryanN

                             Oh good, then I'm not in danger of that happening even if as an admin, I were to sort those same records in a totally different layout (such as an admin only table layout that lets me see all records and all fields)?

                        • 9. Re: Printing Layout with multiple portals, sliding & hiding.
                          philmodjunk

                               You can only sort record from the layout's found set, not the related records shown in a portal. Related records can only be sorted to a static specified sort order chosen in either portal setup or for the underlying relationship.

                               Methods that sort portals "on the fly" have to work around this limitation--either by displaying different copies of the same basic portal each with a different specified sort order or by manipulating values referenced by a complex calculation field that is specified as the field in the portal's sort order.

                               Either way, that's not something that's likely to happen by accident.

                          • 10. Re: Printing Layout with multiple portals, sliding & hiding.
                            BryanN

                                 As always, a great help. Thanks Phil!