Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewer and Print Preview/Print issues: 11x17

Status
Not open for further replies.

pontupo

Technical User
Jul 9, 2007
33
US
On my local machine, when I preview the report, I am shown the report as it is in Crystal in terms of the dimensions of the page. For instance, I have an 11x17 report and it shows up that way in the browser window of my ASP distribution local site, etc. When I click the print button, it also shows up in the Print Preview as 11x17, which is what I want. However, for some reason when I distribute the report to my webserver, in Firefox the report views as Letter (shows up in the CrystalReportsViewer) and when I click print it shows up in the print preview as letter. In IE, the CrystalReportsViewer is 11x17, but the Print preview is again letter. Obviously, this is problematic because the report is in fact 11x17 and I need it to go to preview and print that way. Adjusting the page setup options in the IE print menu doesn't re-adjust the pages because the viewer is set to Print to Pdf, rather than Active X, and exported it to Letter. Furthermore, I could have sworn that it worked properly not even a couple of days ago. I have a line similar to the following:

If (reportDoc.PrintOptions.PageContentHeight = 11 And reportDoc.PrintOptions.PageContentWidth = 17) Then
reportDoc.PrintOptions.PaperSize = PaperSize.Paper11x17
End If

in my code, which definitely worked before and does work locally. It does occur to me that my PDF Export function doesn't have the above lines (and suffers from a similar issue, though again... not on my local machine), but I don't think the Print button utilizes my export code..

Anyone have any ideas why I'm (perhaps suddenly) struggling with this?

Pont
 
Crystal uses the default printer to set page sizes when processing.

Could it be that you do not have the same printer set as default on your web server as you do on your dev server?

When viewing the report via the web server, where is it being processed?
 
The report is distributed via an ASP page and the CrystalReportsViewer on a variety of user machines. One interesting question could be: what are the various settings that the local machines have for their default printer? I can pretty much guarantee that they are as varied as they can be.

I'm pretty sure that the default printer is not the same on the web server as it is on my dev machine. Actually, now that I think about it, there isn't any printer installed on the web server, so I'm not sure what it might default to.

The troubling thing about this, however, is that if I can't modify the default page size on a report by report basis, how is it possible to distribute, via this means anyway, multiple reports of varying sizes?

Further, this problem is definitely in some way intermittent. I haven't heard a complaint to this effect (i.e. "the report exported to a PDF at letter size rather than 11x17") in a number of days, yet just last week I was receiving complaints regularly. Very strange indeed... perhaps I modified something and didn't realize it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top