I am using the CrystalReport viewer object in ASP to show some reports. The reports show up fine except for the fact that I need to pass the parameters and the login info to the report rather than having the clunky Crystal interface pop-up requesting that info. Our users don't like to have to login each time when they run a report. I also have other pages that collect the parameter data for the report and don't want the Crystal to do the prompting.
So how do I pass that info to the report at runtime via ASP?
here is what I have so far:
-------------------------
Dim viewer
Set viewer = objectFactory.CreateObject("CrystalReports.CrystalReportViewer"
viewer.Name = "page"
viewer.IsOwnForm = true
viewer.IsOwnPage = true
Dim theReportName
theReportName = Request.Form("ReportName"
if theReportName = "" then theReportName = Request.QueryString("ReportName"
viewer.URI = "pageViewer.asp?ReportName=" + Server.URLEncode(theReportName)
viewer.ReportSource = theReportName
viewer.ProcessHttpRequest Request, Response, NUll
viewer.EnableLogonPrompt = false
viewer.DatabaseLogonInfos(0).UserName = "SYSADM"
viewer.DatabaseLogonInfos(0).Password = "SYSADM"
viewer.ParameterFields(0) = "AIKEN"
So how do I pass that info to the report at runtime via ASP?
here is what I have so far:
-------------------------
Dim viewer
Set viewer = objectFactory.CreateObject("CrystalReports.CrystalReportViewer"
viewer.Name = "page"
viewer.IsOwnForm = true
viewer.IsOwnPage = true
Dim theReportName
theReportName = Request.Form("ReportName"
if theReportName = "" then theReportName = Request.QueryString("ReportName"
viewer.URI = "pageViewer.asp?ReportName=" + Server.URLEncode(theReportName)
viewer.ReportSource = theReportName
viewer.ProcessHttpRequest Request, Response, NUll
viewer.EnableLogonPrompt = false
viewer.DatabaseLogonInfos(0).UserName = "SYSADM"
viewer.DatabaseLogonInfos(0).Password = "SYSADM"
viewer.ParameterFields(0) = "AIKEN"