I have the below asp page that uses crystals canned web pages to view reports. When I run the report it asks me to login to sql. Is there a way to put that login&password info into the asp page and then set .EnableLogonPrompt = false
<%@ Language=VBScript%>
<%
Response.ExpiresAbsolute = Now() - 1
Session.CodePage = 65001 ' UTF-8
Dim objFactory 'Use the ObjectFactory object to abstract the version number to one location
Set objFactory = CreateObject("CrystalReports.ObjectFactory.2")
Const REPORTSOURCEPARAM = "C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\VendorRatingMain.rpt"
Const CRREPORTSOURCE = "CrystalReportReportSource"
Sub OutputReport()
' DESCRIPTION : Use the web report viewer to view the report specified by the "reportsource"
' request parameter
Dim reportSource
Dim viewer
Dim requestMethod
requestMethod = UCase(Request.ServerVariables("REQUEST_METHOD"))
Select Case requestMethod
Case "POST"
reportSource = Request.Form(REPORTSOURCEPARAM)
Case "GET"
reportSource = Request.QueryString(REPORTSOURCEPARAM)
Case Else
reportSource = Empty
End Select
' View report
If (IsEmpty(reportSource)) Then
reportSource = Session(CRREPORTSOURCE)
End If
If Not (IsEmpty(reportSource)) Then
Session(CRREPORTSOURCE) = reportSource
Set viewer = objFactory.CreateObject("CrystalReports.CrystalReportViewer")
viewer.ReportSource = ReportSource
With viewer
.isdisplaygrouptree=false
'.EnableLogonPrompt = false
.ReportSource = reportSource
.IsOwnPage = false
.HasRefreshButton = true
.Name = "HTML Page Viewer"
End With
Call viewer.ProcessHttpRequest(Request, Response, Session)
End If
if Err.number <> 0 then
Response.Write Err.Description
Err.Clear
end if
Set viewer = nothing
End Sub
%>
<%@ Language=VBScript%>
<%
Response.ExpiresAbsolute = Now() - 1
Session.CodePage = 65001 ' UTF-8
Dim objFactory 'Use the ObjectFactory object to abstract the version number to one location
Set objFactory = CreateObject("CrystalReports.ObjectFactory.2")
Const REPORTSOURCEPARAM = "C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\VendorRatingMain.rpt"
Const CRREPORTSOURCE = "CrystalReportReportSource"
Sub OutputReport()
' DESCRIPTION : Use the web report viewer to view the report specified by the "reportsource"
' request parameter
Dim reportSource
Dim viewer
Dim requestMethod
requestMethod = UCase(Request.ServerVariables("REQUEST_METHOD"))
Select Case requestMethod
Case "POST"
reportSource = Request.Form(REPORTSOURCEPARAM)
Case "GET"
reportSource = Request.QueryString(REPORTSOURCEPARAM)
Case Else
reportSource = Empty
End Select
' View report
If (IsEmpty(reportSource)) Then
reportSource = Session(CRREPORTSOURCE)
End If
If Not (IsEmpty(reportSource)) Then
Session(CRREPORTSOURCE) = reportSource
Set viewer = objFactory.CreateObject("CrystalReports.CrystalReportViewer")
viewer.ReportSource = ReportSource
With viewer
.isdisplaygrouptree=false
'.EnableLogonPrompt = false
.ReportSource = reportSource
.IsOwnPage = false
.HasRefreshButton = true
.Name = "HTML Page Viewer"
End With
Call viewer.ProcessHttpRequest(Request, Response, Session)
End If
if Err.number <> 0 then
Response.Write Err.Description
Err.Clear
end if
Set viewer = nothing
End Sub
%>