[Hi,
Well I am using Sql server 2000 as a backend. Actually I have made 1 function, which is used to load the report every time and the maximum time has been taken in that process.
I need to improve the time to load the report.
I am sending you the function which is used to load the report.
Dim strFile As String
Dim mySubRepDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument 'Sub report document of crystal report.
Try
strFile = mP_strReportLocation & strReportFileNm & ".rpt"
mP_strReportFileName = strReportFileNm
If IsNothing(mP_ObjCrystalReport) = True Then
mP_ObjCrystalReport = New ReportDocument
End If
mP_ObjCrystalReport.Load(strFile)
''Code Added By STS as on 23-Feb-2007============================
If strReportFileNm <> "rpt_loc_stk01500" And strReportFileNm <> "rpt_loc_SPL00700" Then
mP_ObjCrystalReport.Refresh()
End If
''Code Ends Here==================================================
intCounter = mP_ObjCrystalReport.DataDefinition.ParameterFields.Count 'Check if there are parameters or not in report.
'As parameter fields collection also picks the selection formula which is not the parametermeter, so if total parameter count is 1 then we check whether, its a parameter or selection formula.
If intCounter = 1 Then
If InStr(mP_ObjCrystalReport.DataDefinition.ParameterFields(0).ParameterFieldName, ".", CompareMethod.Text) > 0 Then
intCounter = 0
End If
End If
Apart from this, I am trying to use backgroundworker class to resolve this issue. If you have any idea about that then please help me out. Take it as urgent.
Thanks in advance.
Shalabh