chiplarsen
IS-IT--Management
We are using CE 10. I have a report that has two datasources. There are multiple sub-reports also. The report was created using Crystal 10. I run this report using RAS viewing it in IE. I have an ASP page that was created from the CE example page that contains the login information to the database. I can run this report with no problems via IE. The problem is that it take about 5 minutes to return any data. It is terribly slow. I was told that I need to list the tables, used in the report, in the ASP connection page. I do not know the syntax for that. This is one section of the page that list the name of the ODBC connection and the login information.
Does anyone know how to add the names of the tables in this section. I was told this would improve the performance of the report. Thank you
Does anyone know how to add the names of the tables in this section. I was told this would improve the performance of the report. Thank you
Code:
CHANGING THE MAIN REPORT DATABASE INFO
'===============================================================
Set oDBInfo = Session("oClientDoc").DatabaseController.GetConnectionInfos().Item(0)
oDBInfo.UserName = "sa"
oDBInfo.Password = "blackfin"
'Get the collection of tables in the main report
Set Tables = Session("oClientDoc").DataDefController.Database.Tables
For Each table in Tables
'clone the table object
Set newTable = Table.Clone
'set the table's connectionInfo to the current connection info
newTable.ConnectionInfo = oDBInfo
'set the table object qualified name to include the new database name
'i.e. original = 'db1.dbo.myTable', new = 'db2.dbo.myTable'
'newTable.QualifiedName = Database & ".dbo." & Table.Name
'put this newly modified table object back into the report client doc
Session("oClientDoc").DatabaseController.SetTableLocation table, newTable
Next