How to make Crystal Reports Page Width Larger Duri

2019-02-04 21:37发布

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?

7条回答
混吃等死
2楼-- · 2019-02-04 22:06

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:

  1. File > Printer Setup
  2. Choose printer "Microsoft Office Document Image writer"
  3. Paper > Custom Size
  4. Properties (next to printer name)
  5. Enter custom size, and OK, OK and you are done!
查看更多
SAY GOODBYE
3楼-- · 2019-02-04 22:11

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);
查看更多
放荡不羁爱自由
4楼-- · 2019-02-04 22:12

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.

查看更多
ら.Afraid
5楼-- · 2019-02-04 22:22

I set the printer to something absurdly wide and use that. ben's link is the right idea.

查看更多
欢心
6楼-- · 2019-02-04 22:25

use the microsoft xps document writer as your dummy printer, and create a new form from server properties as the post above me states.

查看更多
甜甜的少女心
7楼-- · 2019-02-04 22:28
  1. By changing your reports paper size. Make it to legal/letter etc will increase width of your reports so that you can easily display number of columns (more than 10) on your report.

    To do that Right click --> Design --> Printer Setup -->Paper --> Size .

  2. Another way can be by changing your reports orientation. By default it is Portrait. You can change it to Landscape by

    Right click --> Design --> Printer Setup --> Orientation -->Landscape (Radio button.)

  3. File --> Printer Setup --> properties orientation select Portrait

查看更多
登录 后发表回答