Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Loading Crystal Report in is slow

gopakumargopakumar Member Posts: 4
I m working with 2005 and crystal report 10 .the time to load crystal report is very takes a minute to load a simple report.
the code i used given below.
if anyone know to solve this problem, please give me reply.

Dim repDoc As New ReportDocument
Dim subRepDoc As New ReportDocument
Dim crSections As Sections
Dim crSection As Section
Dim crReportObjects As ReportObjects
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crLogOnInfo As TableLogOnInfo
Dim crConnInfo As New ConnectionInfo
repDoc.Load(CrystalStrReport) 'Report path
crDatabase = repDoc.Database
crTables = crDatabase.Tables
For Each crTable In crTables
With crConnInfo
.ServerName = "Server"
.DatabaseName = "Sample"
.UserID = "sa"
.Password = "abcd"
End With
crLogOnInfo = crTable.LogOnInfo
crLogOnInfo.ConnectionInfo = crConnInfo
crTable.Location = "Sample" & ".dbo." & crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1)
crSections = repDoc.ReportDefinition.Sections
CrystalReportViewer1.ReportSource = repDoc


Sign In or Register to comment.