How do I resize image so dynamic text does not push to 2nd page?
My client wants a one page report. They need to be able to enter up to 200 characters that are included on that report. They also want an instructional image at the bottom of the page that is as large as possible given the remaining space.
The big problem is when they enter new lines in that text for formatting or just paragraph breaks, the image gets pushed to a 2nd page. How can I detect this in time to resize the image and keep it on the same page as the text?
Thanks,
Mike
The big problem is when they enter new lines in that text for formatting or just paragraph breaks, the image gets pushed to a 2nd page. How can I detect this in time to resize the image and keep it on the same page as the text?
Thanks,
Mike
Comments
How is the text and image separated? Are they each in ShiftRelativeTo Regions, or Subreports, or separate bands? Are you using a one pass or two pass report?
Simply shrinking the image can also be troublesome as it looses its clarity every time it is scaled. I would suggest shrinking the font of the text so it will fit rather than scaling the image. Then you could place the image in a static band such as the Footer Band and, knowing the space allotted, reduce the font size so the text is not cut off by the footer.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks,
Mike
Try using the Region.OnPrint event to alter the height of the image. This being the region the image is inside. In my testing, this event fired early enough to successfully alter the image size.
Since you are using a static font size for your text, you should be able to determine how many lines of text are needed to force a page break and resize the image hight accordingly.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com