Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InteractiveViewer and automatice logon for multireports

Status
Not open for further replies.

mcswork

Technical User
Nov 6, 2002
1
US
We have just started giving access to our crysal reports via the EPortfolio viewer. I have found where you can add a line to the interactiveViewer.asp to allow an automatic logon (ie, is passes the logon name and password) and got that to work. The issue is that it wants opens up ALL the reports with having to supply a login and password. Is there a way to limit the passed name and password to a single report?

Below I have pasted in what I tried. I think my IF statement is bypassed, consequently the login screen pops up after the user enters the parameters rather than just automatically entering the information. (Please note that I don't know asp):
<%@CodePage=65001%>
<%
Option Explicit
Response.ContentType = "text/html; charset=utf-8"

Dim objectFactory
Set objectFactory = CreateObject("CrystalReports.ObjectFactory.2")

Response.ExpiresAbsolute = Now() - 1

Dim viewer
Set viewer = objectFactory.CreateObject
("CrystalReports.CrystalReportInteractiveViewer")
viewer.Name = "page"
viewer.IsOwnForm = true
viewer.IsOwnPage = true

Dim theReportName
theReportName = Request.Form("ReportName")

if theReportName = "" then theReportName = Request.QueryString
("ReportName")
viewer.URI = "interactiveViewer.asp?ReportName=" + Server.URLEncode
(theReportName)

[ HERE'S THE PART I MODIFIED ]
|
V
Dim clientDoc
Set clientDoc = objectFactory.CreateObject
("CrystalClientDoc.ReportClientDocument")
if theReportName LIKE '%"& FRED RPT &"%' then
clientDoc.Open theReportName
clientDoc.databaseController.logon "fred", "fred_word"
else clientDoc.Open theReportName
end if
viewer.ReportSource = clientDoc.ReportSource
^
|
[ END MODIFICATION.
also tried LIKE "*FRED*"
also tried = "FRED RPT"]

Dim BooleanSearchControl
Set BooleanSearchControl = objectFactory.CreateObject
("CrystalReports.BooleanSearchControl")
BooleanSearchControl.ReportDocument = clientDoc
viewer.BooleanSearchControl = BooleanSearchControl
viewer.ProcessHttpRequest Request, Response, Session
' ReportClientDocument will be automatically closed when clientDoc
is released
%>


Any and all help greatly appreciated!!!
P
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top