I'm looking for a method to resize the page width Crystal Reports gives me to place fields in my .rpt file.
So far I have discovered if I right click on the report, select 'design'/'printer setup', I can select the size of the paper I want the report to print out on. If I select 'Orientation/Landscape' I can increase the width of the page and I can place more fields on the report.
My goal: Place all of my fields on my report (around 25 of them) and export the data to Excel. Right now I do not have enough width to place all of the fields in the .rpt file.
Is there a way to increase the width of the page to an arbitrary number?
Found it: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=754
Basically add a dummy printer to your system that can take a larger paper size and select that as your printer for the report.
use the microsoft xps document writer as your dummy printer, and create a new form from server properties as the post above me states.
I figured I should add the actual steps here from the accepted answer, rather than go link hunting to do it (it points to another link). What worked for me in crystal reports was:
- File > Printer Setup
- Choose printer "Microsoft Office Document Image writer"
- Paper > Custom Size
- Properties (next to printer name)
- Enter custom size, and OK, OK and you are done!
I set the printer to something absurdly wide and use that. ben's link is the right idea.
I realize that this is a very old topic and the question is about design mode but since this question keeps coming up in my Google searches, I expect that this may help someone. So, I just wanted to add that programmatically, this can be done without a dummy printer like this:
var repDoc = new ReportDocument();
repDoc.Load(rpt_path);
ISCDReportClientDocument clientDoc = repDoc.ReportClientDocument;
clientDoc.PrintOutputController.ModifyUserPaperSize(repDoc.PrintOptions.PageContentHeight, repDoc.PrintOptions.PageContentWidth * 2);