Crystal Report Print to Printer default to Landscape

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
LVL 23
Rajkumar GsSoftware EngineerAsked:
Who is Participating?
 
Rajkumar GsConnect With a Mentor Software EngineerAuthor Commented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
0
 
mlmccCommented:
The printer defaults to what you have set to default to.

mlmcc
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
On development machine now.

In development machine there is no printer installed.

Thanks
Raj
0
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:

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

Would this enough during development ?

Raj
0
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
Thanks mlmcc.

I got some idea.
I will try it
Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
In next meeting with Client, we need to check for the printer that they are using.
I will post back
Thanks
Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
Thanks
I will be back
Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
Thanks!

I will check this and let you know tomorrow

Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
Tomorrow I will check and reply.

I think I tried to download that

Thanks mlmcc
Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
mlmccConnect With a Mentor Commented:
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
 
mlmccCommented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
Thanks mlmcc. I saw your very last comment just now
Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
We upgraded Visual Studio 2005 to Visual Studio 2008. Need to check with new version of Crystal Reports (VS 2008)

Raj
0
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
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
 
Rajkumar GsSoftware EngineerAuthor Commented:
Thanks mlmcc for your suggestions.
Raj
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.