12 Replies Latest reply on Mar 23, 2015 10:27 AM by MunjalKamdar

    Print multiple pictures Loop

    MunjalKamdar

      Title

      Print multiple pictures Loop

      Post

      Here is the situation:

      I have a layout called "L1", which has its own table with multiple fields. It is an evaluation form (Picture FM: 1). As seen in the picture, there is a column setup for inserting multiple pictures, each under another. That layout has two buttons: "PRINT PICTURES" and "PRINT DATA SHEET". When I click on print pictures it prints all the pictures using different layout called "pictures". I am using the script that has structures like Freeze Window>Copy>Set Variable>Go to layout>Show All Records>Enter Find Mode>Paste>Perform Find>Loop>Set Field>Go to record/request/page [Next; Exit after last]>End Loop>Sort Records>Go to Layout>Print>Go to Layout>Else>Exit Script>End If

      The problem is when I try to print the pictures, it prints only one picture and not all of them. I am almost sure that nothing is wrong with the script as it was working fine earlier, but when i tried to mess with the print picture layout to enlarge the size of the pictures being printed, it stopped working as it is supposed to.

      I am not coder, I am a Mechanical Engineer, so I dont know quite alot about coding. All I know is from googling around. I appreciate all the help being offered.

      Thank you.

       

      FM1.JPG

        • 1. Re: Print multiple pictures Loop
          philmodjunk

          it's the other layout, the one used by your print script that we need to see. I would keep it in list view and make sure that your print step (or manual print menu option) specifies "records being browsed" and not current record. If records being browsed is specified, make sure that the print script is correctly pulling up the expected found set of all picture records associated with the current record shown in your screen shot.

          • 2. Re: Print multiple pictures Loop
            MunjalKamdar

            A Picture for the script that is being used

            • 3. Re: Print multiple pictures Loop
              MunjalKamdar

              Here is the picture for the print layout

              • 4. Re: Print multiple pictures Loop
                MunjalKamdar

                I checked the script too and it seems right to me. I mean the layouts mentioned on the script are right.

                Also, like I said earlier, this script was working before, and no one has made any changes to it. I, by mistake did something on the print layout and now it prints only one picture, the first one in the coloumn structure. All the pictures below the first picture are not being printed.

                Like you said, while printing, "records being browsed" is selected, and the page range is set to "all" too. And when I do that, it prints first picture on page one and third (not second) picture on page 2. So basically output is like there will be first picture on the left top of the page and the rest of the page is empty, and on second page, it will print third picture on page two in same fashion. I have like 20 pictures for the same field. And it still prints only first and thrid picture.

                • 5. Re: Print multiple pictures Loop
                  philmodjunk

                  I strongly advise against every using the copy script step except for those few cases where you need that data in the clipboard because you intend to paste it into a different application. Use Set Variable instead.

                  Show all records just before entering find mode does nothing significant and can be removed from your script.

                  Your original layout shows what appears to be a portal listing the associated pictures. If so, your script can be much simpler:

                  If [not IsEmpty ( Pictures::CON ID ) //check to make sure that related records in Pictures actually exsit]  
                        Go To Related Record [Show only related records; From table: Pictures; Using layout: "Pictures" (Pictures) ]
                        Print [Restore; Adobe PDF]
                        Go to Layout [Original layout ]
                  End If

                  and you can use Save As PDF instead of Print if you prefer.

                   

                  • 6. Re: Print multiple pictures Loop
                    MunjalKamdar

                    The script includes copy because the form/layout has a header, which i didnt put it here as it has confidential information, like client name, design no., design specs etc.

                    But this still doesnt solve the problem where the print (hard copy or PDF) includes only first and third picture on seperate pictures.

                    • 7. Re: Print multiple pictures Loop
                      MunjalKamdar

                      This is how it look before. This is a pdf view with two pages side by side.

                      This is how I want it to be.

                      • 8. Re: Print multiple pictures Loop
                        MunjalKamdar

                        This is how it looks now, when i print it. This is a pdf view with two pages side by side

                        • 9. Re: Print multiple pictures Loop
                          MunjalKamdar

                          Like you seen in the above 2 pictures, the image is that is third (left coloumn second row) is now being printed on page 2, and thats all it is printing. Whereas there are 10 images (picture1)

                          • 10. Re: Print multiple pictures Loop
                            philmodjunk

                            The script includes copy because the form/layout has a header, which i didnt put it here as it has confidential information, like client name, design no., design specs etc.

                            You still do not need to do a copy. Set Variable can be used instead of copy to transfer that data to fields on your layout. And I doubt that you even need to do that. If you are using a  related table and a portal for these images, you can simply add those fields from the other layout't table directly to your layout and they will show the same info that you see in them on the other layout.

                            I don't see any need for such a complex Find script.

                            As to your layout, Is it set to print in two columns? Did you change those settings in layout setup?.

                            • 11. Re: Print multiple pictures Loop
                              schamblee

                              I see no need for the script,  The find does nothing for the print layout and the loop does nothing but slow the script down.  Its only purpose is to loop through all the records, and the variables only maintains the value from the last record and those variables are not used in the script nor are they on the print layout.

                              You need to changed your layout as PhilModJunk stated to print in two columns.   Modify Layout, select your print layout, then click edit , then select printing tab, select print two columns. 

                              You can  perform a find in the print layout to limit the records that need to be printed.   You need to resize the body part of your layout to remove the blank white space.

                               

                              • 12. Re: Print multiple pictures Loop
                                MunjalKamdar

                                Thank you very much for all the help.

                                The problem is resolved now. 

                                But, when I duplicate a record, it prints out picture from the new record as well as original record from which I duplicated the record. Is there a way where I can duplicate a record, but when printing, it only prints the picture on the new record?