ASP.NET Report Viewer Landscape Paper Orientation [Resolved]

I was having a problem printing reports using the ActiveX print mode. 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.[b]paperorientation[/b];
    objectTag += "\">";
}

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


NotMyself (BOB member since 2008-01-16)

useless info while i worked though the problem


NotMyself (BOB member since 2008-01-16)