You might use two layouts, one for BOM's with picture and one for BOM's that do not.
You can also set a container field to slide up, resize enclosing part as long as you also select the container field (While in Layout Mode) and use the formatting on the data tab to specfiy top alignment instead of the default center alignment.
Key facts about sliding layout objects:
- It's only visible in preview mode and when you print/save as PDF...
- Sliding fields will shrink but not expand.
- All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
- Objects in headers and footers will not slide.
- Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
- Fields will slide up only if Top alignment is specified for it and will slide left only if Left alignment is specified.
- Consistent side borders are difficult to achieve with sliding fields.
I would agree with Phil, that one of those ways would work.
Another method, (probably unnecessary and more hassle than it is worth) if you don't need a summary at the bottom of the printout, then you could do 2 layouts. One with the 3 normal pages and the other with the picture. Then in the script it can decide whether to just print the 3 pages or print the 3 pages and then go to the layout with the picture and print that, as well. That would allow the picture to be used for other other scripts and layouts.
Thank you for putting BOM conditional value list. Coincidentally, I looked at a different website to try and solve a problem. I had no idea what it was, but I think I have a better idea now.
Not entirely sure how to make the sliding work. How do the page slide up in the print layout and not leave behind an empty space..? I guess i need to set the container to the maximum size of the content (this case A4), and then I have to add an extra page on the layout to make space for the container, but that extra page are never gonna go away if there's no content in the container..?
I could make 2 layouts but at the moment a huge time saver is the abillity to print multiply records at the same time. Is that not going to interfere if printing from 2 different layout simultaneously depending on whether a container i empty or not..?
You need to start the container on the 3rd page. Then with sliding enabled, when it prints it will resize depending on if there is anything in the container. If there is something in the container it will print it, and if there isn't then it will not print the extra page.Close up the space in the layout part that contains the selected fields. To slide the part up relative to all objects, set this option for all the objects that are sliding up. To slide the part up relative to a single object, set this option for that object only.
Also, Phils 2 different layout method is different from what I said.
He said to put one layouts with 3 pages (the original stuff) and one with 4 pages (the original stuff and the object). I said one layout with the 3 pages (the original stuff) and one with the object. Just forget what I said, and we'll concentrate on Phil's solution.
For Phil's one solution, you would either print the one layout OR the other layout, not both. So the script set to print will have an if to check if the container is empty and decide whether to print layout1 or layout2 (one with the container or one without).
Thank you sliding works now - i forgot to turn on "Also resize enclosing part" which did the magic... thanks for bot you guy's help
The container field does not have to be on the last page for this to work. But if you put objects below the container field, they also have to be set with the same slide/resize options as the container field as stated in item 3 of my original post.