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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User ID and password in RAS (CE9) 1

Status
Not open for further replies.

rosenfem

Technical User
May 3, 2002
10
0
0
DE
hi,
after entering the report parameters the RAS asks me for the
database user id and -password (all database types, sql, oracle, ...). where can i save these login informations so that i don't have to type these things everytime??
best regards,
manuel.
 
Im having the same problem, please notify me if you find an answer...

I will appreciate this a lot.
 
From what I can see this feature was removed in RAS. it was one of the main reasons we migrated from CR8.0/WCS to CR8.5/CE. Storing the passwords in the CE database was really useful.

CR9/RAS has returned to "unmanaged" reports, so the userID either has to be in the URL, or you will need to build your page using the RDC. Editor and Publisher of Crystal Clear
 
Thanks for the tip chelseatech!
Can you tell me how I can set the userID and the password in the URL? How is the correct syntax for this?
Best Regards, Manuel.
 
I’ve adapted the ePortfolio Lite interactiveViewer.asp file to include our Oracle Database connection so I don’t have to login every time.

Using the URL I can tell the RAS what report I want to open and it will only prompt for the parameters because I’ve already issued the connection string.

The URL looks like this:
http:\\RAS\cr\interactiveViewer.asp?reportname=drawing bom.rpt

The only thing you’ve got to add is the following:

Dim userName, password
userName = "your_username"
password = "your_password"

clientDoc.DatabaseController.Logon username, password

Hope this helps.

Rob

Here's the full interactiveViewer.asp file ...


<%@ Language=VBScript CodePage=65001 ENABLESESSIONSTATE = False %>
<% Option Explicit
' Note - the CodePage=65001 is needed to display Unicode text correctly in the viewer
' if Session is null for ProcessHttpRequest

'1. Create the ObjectFactory to instantiate Crystal Objects
Dim objectFactory
Set objectFactory = CreateObject(&quot;CrystalReports.ObjectFactory.2&quot;)

Response.ExpiresAbsolute = Now() - 1

'2. Create Viewer
Dim viewer
Set viewer = objectFactory.CreateObject(&quot;CrystalReports.CrystalReportInteractiveViewer&quot;)
viewer.Name = &quot;page&quot;
viewer.IsOwnForm = true
viewer.IsOwnPage = true

'3. Get the Report
Dim theReportName
theReportName = Request.Form(&quot;ReportName&quot;)
if theReportName = &quot;&quot; then theReportName = Request.QueryString(&quot;ReportName&quot;)
viewer.URI = &quot;interactiveViewer.asp?ReportName=&quot; + Server.URLEncode(theReportName)

'4. Create the ReportClientDocument
Dim clientDoc
Set clientDoc = objectFactory.CreateObject(&quot;CrystalClientDoc.ReportClientDocument&quot;)
clientDoc.Open theReportName

'5. User name and Password Variables
Dim userName, password
userName = &quot;your_username&quot;
password = &quot;your_password&quot;

clientDoc.DatabaseController.Logon username, password

viewer.ReportSource = clientDoc.ReportSource
'viewer.EnableLogonPrompt = false



Dim BooleanSearchControl
Set BooleanSearchControl = objectFactory.CreateObject(&quot;CrystalReports.BooleanSearchControl&quot;)
BooleanSearchControl.ReportDocument = clientDoc
viewer.BooleanSearchControl = BooleanSearchControl
viewer.ProcessHttpRequest Request, Response, Null
' ReportClientDocument will be automatically closed when clientDoc is released
%>
 
THAT'S IT!!!

Thanks a lot tragor!

Best regards, Manuel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top