1 2 3 Previous Next 37 Replies Latest reply on Mar 3, 2012 4:27 AM by NaturSalus

    Printing Several Portals

    NaturSalus

      Title

      Printing Several Portals

      Post

      Hello,

      It has already been said many times that it is not a good idea printing a Portal, that Portals wheren't meant to be printed, etc.

      The "recipy" to print one portal has already been detailed in this Forum: 

      The way to print the records displayed in a portal is to build a layout based on the child table that “owns” the records in the portal, and do your printing there.

      The information from the parent record can be in the header or subsummary part.

      The information from the child record should be in the body part.

       

      However, in my case I have a layout based on the "parent" TO that contains 7 portals, each one on a different tab. Each portal is related to a different TO of a different table through a different relationship.

      In my project it makes perfect sense for the user asking: "well I want to print out all the information shown on the layout based on the "parent" TO that contains 7 portals"

      How do I accomplish this?

      How to collect information from different portals in a single printout?

       

      Thanks,

       

      natursalus

       

       

       

       

        • 1. Re: Printing Several Portals
          philmodjunk

          That's a nasty one.

          If you had a linear chain of relationships such as: GreatGrandParent-----<GrandParent-----<Parent-----<Child

          You can base your layout on Child and still include all needed data from the other related tables.

          But when the relationship branches out in a non linear "tree" of relationships, that's not a viable option.

          Reports CAN be printed from layouts with portals if you can work within their limits.

          You can make the portals large enough to display many more rows than you anticipate ever needing and then set them to slide up/resize enclosing part to remove the space taken up by unused portal rows. You can't, however set fields within the portal row to slide up--so if you have text that requires more than one row in one portal records and another uses only one row, you can't slide them up.

          Another option is to define a temporary report table with all the fields of all 7 child tables in one table, then import records into this report table to sort and print them. This can require creating very complicated layouts to handle the different record formats for each table--often by layering fields on top of each other and using either added calculation fields to serve as field labels or layout text with conditional formatting to hide them when they are not appropriate for a given record.

          • 2. Re: Printing Several Portals
            NaturSalus

            Hello Phil,

            I see...

            It seems to me that this is another opportunity for FM Inc to deliver improvements in so many vital areas of FM Pro Advanced 11.

            Hopefully, the upcoming FM 12 wouldn't be just more cosmetic improvements in its design capabilities and would include at least some of the needed improvements.

             

            Thank you for your valuable feedback,

             

            naturalus

            • 3. Re: Printing Several Portals
              NaturSalus

               

              Based on the options that I had,  I decided to create 7 layouts (one for each portal) and concatenate them during their print out as a pdf. So I have final pdf document with 7 pages, one for each layout.

               

              The only problem is that in order to get the "final" pdf document the user is asked 6 times to name the document and choose its saving location.

              Since this is the first time that I am implementing FM Pro Advanced 11 pdf append option I wonder if this is the way it is supposed to work or whether do I have to modify the structure of my script.

               

              Print Script


              # Error Handling
              Allow User Abort [ On ]
              Set Error Capture [ On ]


              # Print Report 1
              Go to Layout [ “ManualReport_1” (manual_APPRAISERmanual) ]
              Enter Browse Mode
              # Show all records
              Show All Records
              # Record sorting
              Sort Records [ Specified Sort Order: manual_APPRAISERmanual::Action; ascending
              manual_APPRAISERmanual::_kf_People; ascending ]
              [ Restore; No dialog ]
              # Save as PDF
              Save Records as PDF [ Records being browsed ]
              [ Document - Compatibility: Acrobat 5 and later ]
              [ Pages - Number Pages From: 1; Include: All pages ]
              [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]
              [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]
              [ Restore; No dialog ]


              # Print Report 2
              Go to Layout [ “ManualReport_2” (manual_USERmanual) ]
              Enter Browse Mode
              # Show all records
              Show All Records
              # Record sorting
              Sort Records [ Specified Sort Order: manual_USERmanual::_kf_People; ascending ]
              [ Restore; No dialog ]
              # Append as PDF
              Save Records as PDF [ Records being browsed ]
              [ Document - Compatibility: Acrobat 7 and later ]
              [ Pages - Number Pages From: 1; Include: All pages ]
              [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]
              [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]
              [ Restore; Append; No dialog ]
              #
              # Print Report 3

              ...

              # Print Report 4

              ...

              # Print Report 5

              ...

              # Print Report 6

              ...

              # Print Report 7

              ...

              Go to Layout [ original layout ]

              Adjust Window [ Resize to Fit ]
              Unsort Records

               

              Since this is the first time that I am implementing FM Pro Advanced 11 pdf append option, I wonder if this is the way it is supposed to work or whether do I have to modify the structure of my script.

               

              Thanks,

               

              natursalus


              • 4. Re: Printing Several Portals
                NaturSalus

                I got it sorted out through two variables: one for the file name and another for the file path.Laughing

                So please disregard my question.

                Thanks,

                natursalus

                • 5. Re: Printing Several Portals
                  NaturSalus

                  Well, I'm still in trouble.

                  The problem I have with my Save script is that no matter on which records I am, my Save script will save as pdf just the first record of the found set.

                   

                  So, let's imagine that I have just 4 records entered and all are shown in the found set:

                  record nº1: M-QMS-001 Quality Manual

                  record nº2: M-ENV-001 Environment Manual

                  record nº3: M-FST-001 Food SAfety Manual

                  record nº4: M-OHS-001 OH&S Manual

                   

                  Now from record nº4, that is from M-OHS-001 OH&S Manual, I trigger the Save Script and what I get as a pdf file is only the record nº 1: M-QMS-001 Quality Manual and not the record nº4: M-OHS-001 OH&S Manual.

                   

                  I have played around with the Options (Records being browsed; Current record) of the Save Records as PDF script step, but that setting only alters the related records from each portal that are included in the pdf file and not the records of the found set included in the pdf file. So, for example if the first portal of record nº 1 has 4 values and I select the option: Save Current record of the Save Records as PDF script step, I get just the first value shown on the portal and the other 3 values are left out.

                  I have also tried disabling the Show All Records script step but it didn't have any effect either.

                   

                  As you can see the Save script allows the user to decide whether to save as pdf file the current or all the records in the found set. Nevertherless, the problem is more basic. Even when the user choses to save as pdf file all the records in the found set, the Save Script will save as pdf only the first record of the found set.

                   

                  Print Scrirpt:


                  # Error Handling
                  Allow User Abort [ On ]
                  Set Error Capture [ On ]
                  #
                  # Multiple Choice Custom Dialog
                  Show Custom Dialog [ Title: "All or Current?"; Message: "Would you like to print all the records in the found set or just the current and
                  selected record?"; Buttons: “All”, “Current”, “Cancel” ]
                  #
                  # Print all records
                  If [ Get(LastMessageChoice) = 1 ]
                  # Print Report 1
                  Go to Layout [ “ManualReport_1” (manual_APPRAISERmanual) ]
                  Enter Browse Mode
                  # Show all records
                  Show All Records
                  # Record sorting
                  Sort Records [ Specified Sort Order: manual_APPRAISERmanual::Action; ascending
                  manual_APPRAISERmanual::_kf_People; ascending ]
                  [ Restore; No dialog ]
                  # Save as PDF
                  Set Variable [ $PdfName; Value:Manual::FullNameManual & ".pdf" ]
                  Set Variable [ $PdfPath; Value:"file:" & Get(DesktopPath) & $PdfName ]
                  Save Records as PDF [ File Name: “$PdfPath”; Records being browsed ]
                  [ Document - Compatibility: Acrobat 7 and later ]
                  [ Pages - Number Pages From: 1; Include: All pages ]
                  [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]
                  [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]
                  [ Restore; No dialog ]
                  Show Custom Dialog [ Title: "PDF Complete!"; Message: "Your PDF is on the desktop with the name " & Quote($PdfName) & ".";
                  Buttons: “OK” ]


                  # Print Report 2
                  Go to Layout [ “ManualReport_2” (manual_USERmanual) ]
                  Enter Browse Mode
                  # Show all records
                  Show All Records
                  # Record sorting
                  Sort Records [ Specified Sort Order: manual_USERmanual::_kf_People; ascending ]
                  [ Restore; No dialog ]
                  # Append as PDF
                  Save Records as PDF [ File Name: “$PdfPath”; Records being browsed ]
                  [ Document - Compatibility: Acrobat 7 and later ]
                  [ Pages - Number Pages From: 1; Include: All pages ]
                  [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]
                  [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]
                  [ Restore; Append; No dialog ]
                  #
                  # Print Report 3

                  ...

                  # Print Report 4

                  ...

                  # Print Report5

                  ...

                  # Print Report 6

                  ...

                  # Print Report 7

                  ...

                  # Print current record only
                  Else If [ Get(LastMessageChoice) = 2 ]
                  #
                  # Print Report 1

                  ...

                  # Print Report 2

                  ...

                  # Print Report 3

                  ...

                  # Print Report 4

                  ...

                  # Print Report 5

                  ...

                  # Print Report 6

                  ...

                  # Print Report 7

                  ...

                  End If
                  Go to Layout [ original layout ]
                  Adjust Window [ Resize to Fit ]
                  Unsort Records

                   

                  My question is how do I need to modify the Save script, so that the user can save as pdf:

                  the current record in the found set; for example record nº 4 in a found set of 4 records.

                  all the records in the found set; for example all 4 records in a found set of 4 records.

                   

                  Thanks,

                   

                  natursalus



                   


                   

                   

                   

                  • 6. Re: Printing Several Portals
                    philmodjunk

                    "current record" and "records being browsed" refer to the records in the found set of the layout's table occurrence, not the records in a portal.

                    Save as or Print steps with current record selected print or save the current record of the found set. Records being browsed saves or prints all records of the current found set.

                    Since this doesn't happen for you, I'm a bit puzzled as to why this would be. What happens if you go to the report layout and enter preview mode?

                    • 7. Re: Printing Several Portals
                      NaturSalus

                      Hello Phil,

                       

                      Thanks for looking into my question

                       

                      "current record" and "records being browsed" refer to the records in the found set of the layout's table occurrence, not the records in a portal.

                      That is what I thought, but if I go from "records being browsed" to "current record"  I get just the first record on the Portal.


                      Let me first illustrate this.

                      It doesn't matter on which of the 4 entered records I am, and I triger the Save Script.

                      I get the message: Would yout like to print all records in the found set or just the current and selected record?

                      Cancel    Current    All

                      Let's say that I choose: All

                      Then I get a sight of the first layout (consequently first portal).

                      And the message that I am attaching.

                      I Select OK and then I get the psf file that you can download here: 

                      http://www.4shared.com/office/eInkaAVo/M-QMS-001-Quality_Manual.html

                       

                       

                       

                      Thanks

                       

                      natursalus

                       

                       




                      • 8. Re: Printing Several Portals
                        NaturSalus

                        Now I am going to carry out the modification from  from "records being browsed" to "current record" but only for the Print Report 1 layout:  “ManualReport_1” (manual_APPRAISERmanual)

                        After doing as said in the previous post,I get the following pdf file:    

                        http://www.4shared.com/office/ZmrUIDih/M-QMS-001-Quality_Manual_curre.html

                         As you can see there is just the first record on the portal to the manual_APPRAISERmanual

                        So, the way I interpret it is that  teh setting in the Save Records as PDF "current record" and "records being browsed" have a bering on the records shown  in a portal.

                        Maybe this could give you a clue about what is going on.

                        Thanks,

                         

                        natursalus

                        • 9. Re: Printing Several Portals
                          NaturSalus

                          Now concerning your question

                           What happens if you go to the report layout and enter preview mode?

                          I have modified the SAve Script and change from

                          Print Scrirpt:

                           

                          # Error Handling
                          Allow User Abort [ On ]
                          Set Error Capture [ On ]
                          #
                          # Multiple Choice Custom Dialog
                          Show Custom Dialog [ Title: "All or Current?"; Message: "Would you like to print all the records in the found set or just the current and
                          selected record?"; Buttons: “All”, “Current”, “Cancel” ]
                          #
                          # Print all records
                          If [ Get(LastMessageChoice) = 1 ]
                          # Print Report 1
                          Go to Layout [ “ManualReport_1” (manual_APPRAISERmanual) ]
                          Enter Browse Mode

                           

                          to 

                           

                          Print Scrirpt:

                           

                          # Error Handling
                          Allow User Abort [ On ]
                          Set Error Capture [ On ]
                          #
                          # Multiple Choice Custom Dialog
                          Show Custom Dialog [ Title: "All or Current?"; Message: "Would you like to print all the records in the found set or just the current and
                          selected record?"; Buttons: “All”, “Current”, “Cancel” ]
                          #
                          # Print all records
                          If [ Get(LastMessageChoice) = 1 ]
                          # Print Report 1
                          Go to Layout [ “ManualReport_1” (manual_APPRAISERmanual) ]
                          Enter Preview Mode

                           

                          So if the current record is "record nº4: M-OHS-001 OH&S Manual" and I trigger the Save Script I end up getting a pdf file that contains only record nº1: M-QMS-001 Quality Manual


                          Thanks,


                          natursalus

                          • 10. Re: Printing Several Portals
                            philmodjunk

                            Can you post a screen shot of the above layout while it is in layout mode? (Ps. first down load link is invalid when I click it.)

                            • 11. Re: Printing Several Portals
                              philmodjunk

                              Just spotted something. Change the view as setting to View as List instead of View as Form.

                              • 12. Re: Printing Several Portals
                                NaturSalus

                                 

                                I don't now if you have noticed that the Portal values are repeated twice in the pdf file, although originally there was only one value. 

                                 

                                So although you see Approved by: John Smith twice in reality there was only one value in the POrtal.

                                 

                                Thanks,

                                natursalus

                                • 13. Re: Printing Several Portals
                                  NaturSalus

                                   

                                  Ps. first down load link is invalid when I click it.

                                  Sorry, another try: http://www.4shared.com/office/eInkaAVo/M-QMS-001-Quality_Manual.html?

                                  Here


                                  Can you post a screen shot of the above layout while it is in layout mode?

                                  Certainly

                                  P.S. the layout Defualt view:List View


                                  • 14. Re: Printing Several Portals
                                    NaturSalus

                                    The same layout in Browse mode

                                    1 2 3 Previous Next