My Main report contains five Subreports.
The Datasource of the Main and the five Subreports are all the same and a test in the Crystal Reports Designer works fine.
Now when I run the Report via RAS on a Browser with the ActiveXViewer-Plugin I have an ASP-File which is doing the creation of all the RAS-SDK-Objects, the Logon to the Datasource and the setting of the values of the Parameter-Fields.
------------------------------------------------------
This Code is responsible for the Logon to the Main-Report:
Set TableCollection = Session("oClientDoc"
.Database.Tables
for each table in TableCollection
indexTable = Session("oClientDoc"
.Database.Tables.FindByAlias(CStr(table.name))
Set oConnInfo = Session("oClientDoc"
.Database.Tables.Item(indexTable).ConnectionInfo.Clone
oConnInfo.UserName = User
oConnInfo.Password = QS_SEOPassword
Session("oClientDoc"
.DatabaseController.ModifyTableConnectionInfo CStr(table.name), oConnInfo
Next
------------------------------------------------------
But this code just logs on to the main Report.
On the Crystal Webpage I found an example for logon to subreports with RAS. Here is the Code:
set Subreports = Session("oClientDoc"
.SubReportController.QuerySubreportNames
for each sr in Subreports
Set SubReportTablesCollection = Session("oClientDoc"
.SubReportController.GetSubreportDatabase(sr).Tables
for each Old_SubReportTable in SubReportTablesCollection
set New_SubReportTable = Old_SubReportTable.Clone
New_SubReportTable.ConnectionInfo.UserName = QS_User
New_SubReportTable.ConnectionInfo.Password = QS_Password
Session("oClientDoc"
.SubReportController.SetTableLocation sr, Old_SubReportTable, New_SubReportTable
Next
next
-------------------------------------------------------
But when i run now the report I unfortunately receive the Error "You are not licensed to use the Report Application Server's report creation API".
What can I do to just view my Report with Subreports over the Browser. It cannot be possible that the setting of the logon-information at runtime is a runtime creation process of a report. An Example of ASP-RAS Code for logon to Main and Subreport would be helpful.
Thanks in advance for your help.
The Datasource of the Main and the five Subreports are all the same and a test in the Crystal Reports Designer works fine.
Now when I run the Report via RAS on a Browser with the ActiveXViewer-Plugin I have an ASP-File which is doing the creation of all the RAS-SDK-Objects, the Logon to the Datasource and the setting of the values of the Parameter-Fields.
------------------------------------------------------
This Code is responsible for the Logon to the Main-Report:
Set TableCollection = Session("oClientDoc"
for each table in TableCollection
indexTable = Session("oClientDoc"
Set oConnInfo = Session("oClientDoc"
oConnInfo.UserName = User
oConnInfo.Password = QS_SEOPassword
Session("oClientDoc"
Next
------------------------------------------------------
But this code just logs on to the main Report.
On the Crystal Webpage I found an example for logon to subreports with RAS. Here is the Code:
set Subreports = Session("oClientDoc"
for each sr in Subreports
Set SubReportTablesCollection = Session("oClientDoc"
for each Old_SubReportTable in SubReportTablesCollection
set New_SubReportTable = Old_SubReportTable.Clone
New_SubReportTable.ConnectionInfo.UserName = QS_User
New_SubReportTable.ConnectionInfo.Password = QS_Password
Session("oClientDoc"
Next
next
-------------------------------------------------------
But when i run now the report I unfortunately receive the Error "You are not licensed to use the Report Application Server's report creation API".
What can I do to just view my Report with Subreports over the Browser. It cannot be possible that the setting of the logon-information at runtime is a runtime creation process of a report. An Example of ASP-RAS Code for logon to Main and Subreport would be helpful.
Thanks in advance for your help.