4 Replies Latest reply on Sep 24, 2016 9:38 AM by scottworld

    Print Record error


      Here I am getting error in preview mode, as I print in browse mode it shows correct current record no. which has to be print, but in preview mode it shows very first record no. and printing that 1st record. From last two days I am getting this error. Every time I have to select desired record no. for further printing. If any one can give me advice for this issue.

      ThanksScreenshot (4).pngScreenshot (5).png

        • 1. Re: Print Record error

          Preview doesn't know CURRENT record (only the printer dialog does).

          1. Isolate that record for preview


          2. get the "page" (record) number this would be on and perhaps script a

          Enter Preview mode

          Go to Record/Request/Page ... (use the record you need)


          script name: Preview Me

          Set Variable ( $me ; Get ( RecordNumber ) )

          Enter Preview mode

          Go to Record/Request/Page ( no dialog ; by calculation = $me )


          of course, this depends on how tall your page is (that it fits the bounds of a page based on the portrait/landscape in print setup).


          • 2. Re: Print Record error

            Whenever you enter preview mode, it starts at the first page of your found set (which, in your case, is the entire first record... but sometimes the first page might show several records).


            So, in your case, you can do a script like Beverly suggested, because you already know which record is on which page.


            Or, an easier way is to just isolate the record within your current found set -- before printing or previewing -- using these 3 script steps:


            Show All Records

            Omit Record

            Show Omitted Only


            You could also do this in a new window so you don't lose your current found set in the existing window.


            You could also isolate your one record by doing a self-relationship and going to related records based on the self-relationship.


            So there are many different ways to isolate your one record for printing.

            • 3. Re: Print Record error

              There is a small chance that:


              Show All Records

              Omit Record

              Show Omitted Only


              can fail to isolate a single record in hosted database systems. If another user creates a new record in this table at just the wrong point in time, The last step can produce a found set of two records rather than one.


              A safer and single step script to do the same:


              Find Matching Records--> specify the table's primary key or any field that uniquely identifies each record.

              • 4. Re: Print Record error

                Great point, philmodjunk! Thanks for pointing that out!