1 2 Previous Next 27 Replies Latest reply on Mar 20, 2016 7:33 PM by Stephen Huston

    Preview before print layout

    cillion

      Hi.

      How will I be able to make a preview of the print layout with a back button to the current layout if the user desides not to print it out?

      Now my print button will allways popup the printer dialog, and result in printing.

        • 1. Re: Preview before print layout
          rgordon

          Use the following script steps

           

          Allow User Abort [off]

          Go to layout[ enter your print layout]

          Enter Preview Mode

          Pause Script

          Show Custom Dialog  (have a button called Print and a Cancel button)

          If (Get(lastmessagechoice =1)

            Print

          End if

          Enter Browse Mode

          Go to layout [original]

           

          This script will allow the user to preview the layout.  When they hit the enter key the script will then show the Custom Dialog which will allow the user to print or cancel

          • 2. Re: Preview before print layout
            cillion

            Thanks rgordon. Nice script, but the user would only see the first page, and not able to view the other pages since the Status Toolbar would not be availeble for the users.

            1.How to make the preview scollable?

            2.How to change the button for bringing up the dialog to "Esc" and not "Enter"?

            • 3. Re: Preview before print layout
              Vaughan

              I like opening print previews in a new window, and not having a script paused. Users can then have multiple windows open with previews if they wish.

               

              There is often benefit to allow the user to "preview" a summary report in browse mode so they can scroll through and see the data in a continuous manner. I have just started using a technique where a complex report opens with a summarised view, in browse mode. Buttons on the summary parts allow more detailed reports of subsets of the data to be viewed in new windows. Users are loving it, and the subsets of data are minimising server load. At any point they can preview and save to pdf or print, or send an e-mail, all using the native FM tool bar icons.

              • 4. Re: Preview before print layout
                Vaughan

                I often put text "messages" to users with instructions. The ability to hide objects makes this easy and Get(WIndowMode) means objects can be  made to appear in different modes. Get(WIndowMode) returns 3 for "printing in progress" so it's possible to have objects appear in preview mode, but not print. So in Browse mode I can make a message that says "preview to save to pdf and print" while in preview mode another message can say "change to browse mode to change the level of report detail".

                • 5. Re: Preview before print layout
                  rgordon

                  Another option is to create a pdf of the preview.  Then view the pdf through a webviewer or container field   This would give you the flexibility to put buttons on the layout.

                  • 6. Re: Preview before print layout
                    cillion

                    I now discovered two things, when login into webdirect, I cant press enter to bring up the dialog for print or get back.

                    • 7. Re: Preview before print layout
                      cillion

                      Secondly I cant close the new windows with X, on filemaker pro, and in webdirect the close "X" dont show at all

                      • 8. Re: Preview before print layout
                        cillion

                        Now I have a custom dialog that only shows when the user pressing enter, if so the user have 2 option;

                        - either go back to the orginal layout (where the print button is), or

                        - choosing print that will appear the print dialog for choosing printer, and then  go back to orginal layout

                         

                        When the user choosing number 1, there will be not possible to place a back button on that preview

                        • 9. Re: Preview before print layout
                          cillion

                          I do not want to create and store the pdf every time the user selects this functionality

                          • 10. Re: Preview before print layout
                            Markus Schneider

                            are Your users using webd? If so, preview is not available under webd..

                             

                            for FileMaker clients, You can use rgordons' script and make the menuebar visible just before the preview step, remove the menuebar right after that step. If You do not allow user-abort, this shood be fine - and users can browse through the pages of the preview

                            • 11. Re: Preview before print layout
                              rgordon

                              You can also leave the toolbar hidden but not locked to use Ctrl + up/down arrows to toggle between the pages. You can then lock the toolbar again at the end of the script.

                              • 12. Re: Preview before print layout
                                cillion

                                Okey, I added both toolbar and menubar to make it possible on both Pro and webdirect.

                                The problem with the print function will only work on Pro, since the print dialog dont show in webdirect. How can I make it possible to print in the browser?

                                 

                                This is my script now:

                                 

                                Allow User Abort [ Off ]

                                Freeze Window

                                Go to Related Record [ From table: “PeopleProject” ; Using layout: “Prev. proj. summery (large)” (PeopleProject) ][ Show only related records ]

                                Enter Preview Mode

                                Show/Hide Menubar[ Show ]

                                Show/Hide Toolbars[ Show ]

                                 

                                Pause/Resume Script [ Indefinitely ]

                                Show Custom Dialog [ Title: "Print?"; Message: "Do you want to print or preview?"; Default Button: “Print”, Commit: “Yes”; Button 2:

                                “Back to Project” , Commit: “No” ]

                                 

                                If [ Get(LastMessageChoice)= 1 ]

                                Print [ Records being browsed ; All Pages; Orientation: Portrait; Paper size: 8,5" x 11" ]

                                [ Restore: Microsoft Print to PDF ]

                                 

                                Go to Layout [ original layout ]

                                End If

                                Show/Hide Menubar[ Hide ]

                                Show/Hide Toolbars[ Hide ]

                                 

                                Enter Browse Mode

                                Go to Layout [ original layout ]

                                • 13. Re: Preview before print layout
                                  cillion

                                  Nice to know, but in my case it would not work

                                  • 14. Re: Preview before print layout
                                    cillion

                                    2.How to change the button for bringing up the dialog to "Esc" and not "Enter"?

                                    Is there a way @rgordon ?

                                    1 2 Previous Next