I have been asked to allow users to add their own picture to the front page of a report. The problem is, that, if the picture is too big, it starts pushing things down to the next page and kills the entire report. Is there a way to reliably constrain the size of a dynamically placed image?
Solved! Go to Solution.
I have a solution that I'll share here. I hope there is a better one out there. I turned the app into a chained app where the first step is to input the image, center it using the layout tool, then render it in the size required for the second step in the app.
Hi @StephenR
This solution is a little easier and worked for me with a small sample table and a sample picture:
I created two separate layouts, one for the picture and one for the rest of the report. I forced the picture to be a certain size in the layout tool which should keep it to one page. Then I combine these two items using another layout tool with "Vertical with Section Breaks" selected as the Orientation. This should always push the second part of the report on a new page.
I'm attaching the app.
Will this solution constrain it to less than one page? The report that was being constructed had dynamic text on the same page as the picture. It seemed that rendering the image was the only way to get a specific size.
Hi @StephenR
If the text is limited to just a few lines, then yes, it will stay on one page but unfortunately there is no "shrink to page" option in the layout tool. It won't truncate text or shrink it to tiny font to make it fit. The "vertical layout with section breaks" option will make sure that your actual report doesn't start on the same page as the picture but your front page might end up two pages long.
That would be a great feature request though, if you could take the time and submit it as an idea here, we would appreciate!
Thank you @HenrietteH, the Idea is located here. It seems that at the moment, my current solution is the best option.