I Am Not Myself

Bills.Pay(Developer.Skills).ShouldBeTrue()

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 += "\">";
}

change it to:

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: