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

Problem with setting Login-Information in RAS ASP

Status
Not open for further replies.

Rioleti

Programmer
Jan 16, 2004
8
0
0
LI
Hi there

i have a report wich has a subreport on it. The Main Report has one SQL-Datasource.
The Subreport has the same SQL-Datsource and a Domino-Datasource.
Now i need to set the Logon-Information (User/Password) through the RAS-SDK in an ASP-Script.
Crystal has a set of Sample-Reports with ASP's. In this samples are both cases: logon on mainreport and logon on subreport.
I made the logon to the Mainreport like the following:

indexTable = Session("oClientDoc").Database.Tables.FindByAlias("MR_SQLSource")
Set oConnInfo = Session("oClientDoc").Database.Tables.Item(indexTable).ConnectionInfo.Clone
oConnInfo.UserName = CStr(QS_User)
oConnInfo.Password = CStr(QS_Password)
Session("oClientDoc").DatabaseController.ModifyTableConnectionInfo "MR_SQLSource", oConnInfo

The Logon to the Subreport-Datasources i made like this:

set SubTables = Session("oClientDoc").SubreportController.getSubreportDatabase("Matter_Situation").Tables

for each SubTable in SubTables
if SubTable.alias = "SR_SQLSource" then
set newSubTable = SubTable.Clone
newSubTable.ConnectionInfo.UserName = CStr(QS_User)
newSubTable.ConnectionInfo.Password = CStr(QS_Password)
Session("oClientDoc").SubreportController.setTableLocation "Matter_Situation", SubTable, newSubTable
elseif SubTable.alias = "SR_DomSource" then
set newSubTable = SubTable.Clone
newSubTable.ConnectionInfo.UserName = CStr(QS_SEOUser)
newSubTable.ConnectionInfo.Password = CStr(QS_SEOPassword)
Session("oClientDoc").SubreportController.setTableLocation "Matter_Situation", SubTable, newSubTable
end if
next

But unfortunately the report is not being displayed. But when i delete the one different Domino-Datasource from the subreport, the report works without any problem.
When i try the report in the Crystal Designer the Report works properly with all Datasources on it.
Has someone a sample code how the logon to a report with a subreport with different datasources on it?



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top