3 Replies Latest reply on Aug 29, 2010 8:10 AM by sunmoonstar.13

    placing multiple images on a report

    jimbodaddio

      Title

      placing multiple images on a report

      Post

      need a little help.

      two related tables. one for case studies, another for images. multiple images per record.

      the report layout displays 4 images in different positions. i want to be able to choose (preferably from within the layout view) which image is displayed in each container.

      i've been using a calculation field (in the "case studies" table) to get the image from the "images" table, but what i need is a way to choose the images one at a time in each portal/container from within the report layout. from what i gather, you can't create a dropdown list that displays images. does anyone know another way to make something like that happen? or any alternate ideas?

        • 1. Re: placing multiple images on a report
          sunmoonstar.13

          I can think of two ways:

          1. Go to a List View layout based on your Image table, then, with an appropriate script, you would click on an image to add it to the portal on the Case Studies layout. Of course, this means you're navigating away from your original layout to select an image record.

          2. If you really need to stay on your original layout, you could create a new portal to the Image table to use as your "image selection" portal. As above, with an appropriate script, you would click on an image in the "image selection" portal to add it to the main portal. The "image selection" portal would be based on another table occurence of the Image table and related to the Case Studies with a Cartesian join (joined with an X in the Edit Relationship dialog) so that all the image records in the Image table will be displayed in this portal. This solution means, of course, that your "image selection" portal is always visible on the Case Studies layout, which may or may not be what you want.

           

          Nick

           

          • 2. Re: placing multiple images on a report
            jimbodaddio

            Nick-thanks for the response. Maybe I have "Beginner's Fear of Scripts", but i've been working towards a different approach, but I'm not sure how to pull it off. Here's what I'm thinking: since I need exactly 4 images for each case study page, would it make sense to create 4 calculation fields (image1, image2...) in the main caseStudy table that let me choose from the related images in the image table? This lets me decide which picture goes where on each individual layout.

            The problem is that's as far as I get. I'm not good enough in FileMaker to know exactly how to create those calculations or how to embed the images (portal or calc field?) on the layout.

            I know I should get started ith scripts, but does any of what I've ben trying make sense?

            My original solution was to create 4 container fields in the main table (image1,...) and then just enter the pics based on pre-arranged field placement. That seemed klunky and inelegant, so I started pursuing other directions.

            What kind of script would you use? How would that solution work? I'll dig into the script section of the FM and see if I can figure it out on my own, but I sure do appreciate any help I get. Thanks!

            • 3. Re: placing multiple images on a report
              sunmoonstar.13

              > Maybe I have "Beginner's Fear of Scripts"

              Are you saying you've never written a script?

               

              > would it make sense to create 4 calculation fields...that let me choose from the related images in the image table

              No, not really, because a calculation won't really let you "choose" anything, it'll just generate a result based on specified criteria.

              You mentioned in your original post that you've "...been using a calculation field (in the "case studies" table) to get the image from the 'images' table". Could you show us what that calculation is?

              In any case, think you're better off using table relationships, a portal and a script or two. A portal will present your images in a list format, but I gather that you want the images to appear in a grid format, or some other arrangement on the page. I believe it's possible to have four portals, placed wherever you want, each showing just one row (i.e. one image), and set up so that each portal shows a specific row (Portal 1 shows image 1, portal 2 shows image 2, etc.) but I've never needed to use this technique myself, so I can't give any advice on how to set that particular scenario up. But if you're not familiar with portals and scripts, this technique would be a bit advanced anyway.

              IMO, I think the best solution for you at this stage is to set up an ordinary portal (with 4 rows) on your Case Studies layout and implement option (1) above in my earlier post. I think you need to get a basic solution working first (even if it may not "look" exactly the way you want it to right now) and then develop a more sophisticated solution later.

              Nick