Can a crystal report be scaled to fit page?
I'm hoping to achieve something similar to Microsoft Excel's Scale To Fit feature wherein a large spreadsheet can be scaled to fit a 8.5"x 11" page. (On MS Excel 2007 goto Page Layout > Scale To Fit).
Im searching of a way to make a large report fit into a smaller page during print. for example a开发者_如何转开发 report designed in Legal(8.5"x 14") page must be able to shrink when print previewed for Letter(8.5"x 11") page.
In my crystal report, it should be scaled to fit the page by default. I was thinking maybe theres a Crystal Report Setting or C# code technique that I missed out.
Any hint or link to the right direction is appreciated.
Thanks!
If you change the paper size programmatically, you will lose some of the canvas (hence fields).
Moreover, I'm not aware of any native API calls to scale the report as you request.
Workarounds:
- print the report to PDF. In my experience, the Acrobat viewer will automatically scale the document to 8.5" x 11". Take a look at the article I wrote about correcting the automatic scaling: Adobe Acrobat – Printing Legal Landscape Documents
- export the report to Excel, then use its shrink-to-fit option.
- create a custom printer driver (akin to MS XPS image writer) to scale the image before printing--clearly not an easy task
精彩评论