Crystal Report Orientation = Landscape in asp
I want to display crystal report in landscape orientation in asp pages.
Cannot display report in Landscape orientation. Anyone got solution, please help... tq :)
My code as below:
Sub Window_Onload
'msgbox "try"
'On Error Resume Next
Dim webBroker
Dim printerSettings
Set webBroker = CreateObject("CrystalReports10.WebReportBroker.1")
Set printerSettings = CreateObject("CrystalReports10.CRPrinterSettings")
if ScriptEngineMajorVersion < 2 then
window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
else
Dim webSource
Set webSource = CreateObject("CrystalReports10.WebReportSource.1")
webSource.ReportSource = webBroker
'webSource.URL = "RDCrptserver10.asp"
webSource.URL = Location.Protocol + "//" + Location.Host + "/scrreports/RDCrptserver10.asp"
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
printerSettings.PaperOrientation = 2
CRViewer.ViewReport
End Sub
|