Solved

Crystal Report Print to Printer default to Landscape

Posted on 2011-02-17
29
3,692 Views
Last Modified: 2012-05-11
I am working on a ASP.Net website using Crystal Report.

We have designed our reports in Landscape mode. - Please see the screenshot below
Report Design Mode - LandscapeBut in runmode, when we click on print button in the report, the default option in the print settings dialog box seems to be Portrait. - Please see the screenshot below
Report Run Mode - Portrait
Is there any way to make it default 'Landscape', if it is printing from a Crystal Report that is set for Landscape mode.  

Hope this make sense

Raj
0
Comment
Question by:Rajkumar Gs
  • 20
  • 9
29 Comments
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34915876
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34916932
The printer defaults to what you have set to default to.

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34923569
Thanks mlmcc for you suggestion and welcome to this discussion

>> The printer defaults to what you have set to default to.
But as shown in the screen shots, it defaults wrongly.

I am trying a way such as if Portrait is set in Crystal Report Viewer during Development, it should automatically select Portrait OR if Landscape, then Landscape
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34926773
I don't believe it works that way.  I had the same issue and the only way around it that I found was to set the printer to default to landscape.  It seemed the report could change it back to portrait but not the other.

Is this on your development machine or a client?

If a client then are they using the same printer driver you had on the development machine?

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34927724
On development machine now.

In development machine there is no printer installed.

Thanks
Raj
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34928052
Crystal uses the default printer for its settings.  If there is no printer then when you put it on a machine with a default printer Crystal "changes" the report to use the default printer settings.

You can adda printer driver to your develpment machine and use it as the default.  I had to do that to allow our reports to print duplex or in color since my printer couldn't do that.  I simply installed the appropriate printer driver and then never printed the report on my dev box.

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34928828

Today I installed BullZip PDF Printer in my development machine to see the output of print.

Would this enough during development ?

Raj
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 34931484
Is that the printer they are using in the production system?
If so then that is fine.  If they are using an actual printer or a different PDF printer then it is a start but Crystal will not find it on the production systems a nd revvert to the default printer settings.

I had a similar issue since the users had printers that could duplex.  I had to install a printer driver that could duplex otherwise the users couldn't access that feature.

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34931611
Thanks mlmcc.

I got some idea.
I will try it
Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34967774
In next meeting with Client, we need to check for the printer that they are using.
I will post back
Thanks
Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35080029
mlmcc, Thanks for your support yet!

I got this response from client when asked for printer they are using
"It is not possible for us to tell which driver as people are using EAPP for many different computers and different locations. We need a universal solution, or maybe you can use a universal driver?"

Hope you will reply soon.

Raj
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35085270
I think if the they are changing printers then all bets are off for doing what you want.  They may need to speicfy it when they print through the printer control.

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35090975
Thanks
I will be back
Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35093376
mlmcc

I believe, we are close to the perfect solution!

I installed EPSON printer driver and selected it as the printer in design mode. But still at runtime, even the same printer is available, the default reset to Portrait.

I googled and came to know that this issue is fixed by Crystal Report - they released a patch for that
Please search in this PDF for 'landscape' -
http://ftp1.businessobjects.com/webprod/hot_fixes/MHF_readme/Crystal10/common10win_en.pdf

But I couldn't find out this patch.

I got an alternative solution that worked in development machine ( Windows Xp )
Here is the alternative solution - http://www.iamnotmyself.com/2008/03/31/ReportViewerLandscapePaperOrientationBug.aspx

Now it working perfectly - Even if I am selecting 'No Printer' or different printer, Landscape option will be available as default on runtime even on different printer.

But when I tried to update it to our testing server - which is having Windows Server 2003, I couldn't find this file location
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\ CrystalReportWebFormViewer3\html\crystalprinthost.html

In brief, to get the solution,
Please help me by providing the location of the file 'crystalprinthost.html' in a Windows Server 2003 system
OR
Please help me by providing the download link the patch fix from Crystal Report (Please refer the above mentioned PDF)

Thanks to keep in touch
Raj
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 100

Expert Comment

by:mlmcc
ID: 35096418
I don't have a Win2003 system.

I believe this has the fix

https://smpdl.sap-ag.de/~sapidp/012002523100006252632008E/common10win_en.zip

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35096511
Thanks!

I will check this and let you know tomorrow

Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35108062
Downloaded that file and when try to install, an error
 HotFix Installation Error
We are working on Microsoft Visual Studio 2005 - Crystal Reports

So I believe, if we get the relevant Hotfix package from Crystal Report, this issue is solved and closed

Please help me to locate the relevant hotfix.
Or
Any clue how to do the manual fix by changing the file - crystalprinthost.html  in Windows 2003 Server

Raj
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35110428
If you are using the Crystal that comes with VS that is not CR10 though it is based on CR10 and when checked will say it is CR10.2.  It is what Crystal calls CR.Net and you need to use fixes for that.

Not sure how to find that fix since it may be in anuy of the SPs for CR.Net.

There appears to have been only 1 update for the VS2005 version.
http://resources.businessobjects.com/support/additional_downloads/service_packs/crystal_reports_en.asp#NET2005

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35110860
Tomorrow I will check and reply.

I think I tried to download that

Thanks mlmcc
Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35116043
mlmcc:
We downloaded that SP and installed it our Windows Xp development machine, with old crystalprinthost.html  (which is having bug)

But this issue is not solved.

Seems to be hardtime!

Why so hard to find out the hotfix - no idea

Or can you help me anyway (email or forum) to contact Crystal Reports about this issue ?

Raj
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 100 total points
ID: 35116636
The hotfix you refer to was for CR10 not the .Net version which you are using.  In many cases they never bothered to fix the .Net version because it is really an OEM version.  Those require additional work to make a fix and they may have determined it wasn't a real issue for that version.

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35116640
The link to the fix should have links to enable you to contact SAP
As far as I know they have dropped all support for the VS2005 version.

mlmcc
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35116690
So no way :(

I have the fix with Windows Xp, works perfectly in development machine. - But what use!

To deploy it to Server is not possible - Bad luck

Any way to get support from Crystal Reports ?

Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35116720
Thanks mlmcc. I saw your very last comment just now
Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35148805
We upgraded Visual Studio 2005 to Visual Studio 2008. Need to check with new version of Crystal Reports (VS 2008)

Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35164967
We dropped the plan to use Visual Studio 2008 Crystal Reports, due to some issues with that
Here is the question that I posted for that issue
http://www.experts-exchange.com/Database/Reporting_/Crystal_Reports/Q_26892950.html

Only hope is that If I know the file - crystalprinthost.html - in a Windows Server 2003 - hope by modify the file this issue would be solved. - Or similar manual fix.

Raj
0
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 0 total points
ID: 35206055
What I understood is that - this is a Known-Bug of 'Crystal Reports with Visual Studio 2005. Same issue also seems to be with 'Crystal Reports of Visual Studio 2008.

Crystal Reports has fixed this bug and released patch. But not seems to be available for Visual Studio 2005 Crystal Reports.
In this Release Notes of Crystal Report, search for 'Landscape'.

I got an alternative solution that worked in development machine ( Windows Xp )
Here is the alternative solution - http://www.iamnotmyself.com/2008/03/31/ReportViewerLandscapePaperOrientationBug.aspx

Now it working perfectly - Even if I am selecting 'No Printer' or different printer, Landscape option will be available as default on runtime even on different printer.

But when I tried to update it to our testing server - which is having Windows Server 2003, I couldn't find this file location
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\ CrystalReportWebFormViewer3\html\crystalprinthost.html

So you need to find out the patch fix available from Crystal Reports for the version of Crystal Report you are using.


0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 35206090
This is from the link that I posted in the above comment

Report Viewer Landscape Paper Orientation Bug
I was having a problem printing reports using the ActiveX print mode in the Crystal Reports Viewer control. The problem is described exactly here.

When using the Crystal Reports Viewer for .NET, if the PrintMode property is set to ActiveX reports designed to print landscape will display correctly but print portrait.

There is a bug in the crystalprinthost.html located @ C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETClientFiles\ CrystalReportWebFormViewer3\html\crystalprinthost.html

The following code must be changed in the file:

if (window.dialogArguments.pageorientation) 
{    
objectTag +="<PARAM NAME=\"PageOrientation\" VALUE=\"";    
objectTag += window.dialogArguments.pageorientation;    
objectTag += "\">";
} 

Open in new window

change it to:


if (window.dialogArguments.[b]paperorientation[/b]) 
{    
objectTag +="<PARAM NAME=\"PageOrientation\" VALUE=\"";    
objectTag += window.dialogArguments.paperorientation;    
objectTag += "\">";
}

Open in new window

NOTE: You are only changing the javascript property name pageorientation to paperorientation, the param needs to stay the same
0
 
LVL 23

Author Closing Comment

by:Rajkumar Gs
ID: 35239013
Thanks mlmcc for your suggestions.
Raj
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now