Hi everybody!
First of all, sorry for my english.
I run the program step by step to see where is the problem, but there is something that I don't understand.
The thing is, when the Record Set is open takes a long time to process because the complexity of the query, but at the moment of the preview (CRViewer1.ViewReport) I think the query is processed again because is taking long time too.
Could someone tell me is this is Ok, or what can I do to improve this?
This is the source code:
Set adoRS = New ADODB.Recordset
' ******** Here the Oracle connection is made *******
adoRS.Open gstrSQL, gcnOracle, adOpenForwardOnly,
adLockReadOnly, adCmdText
Set crRep_RotaBod = New cr_RotaBod
crRep_RotaBod.ParameterFields(1).AddCurrentValue gstrParameter1
crRep_RotaBod.ParameterFields(3).AddCurrentValue gstrParameter3
crRep_RotaBod.ParameterFields(2).AddCurrentValue gstrParameter4
crRep_RotaBod.Database.SetDataSource adoRS
CRViewer1.ReportSource = crRep_RotaBod
'*** Here the preview is made, and I supouse the query is being re-executed***
CRViewer1.ViewReport
Thanks
First of all, sorry for my english.
I run the program step by step to see where is the problem, but there is something that I don't understand.
The thing is, when the Record Set is open takes a long time to process because the complexity of the query, but at the moment of the preview (CRViewer1.ViewReport) I think the query is processed again because is taking long time too.
Could someone tell me is this is Ok, or what can I do to improve this?
This is the source code:
Set adoRS = New ADODB.Recordset
' ******** Here the Oracle connection is made *******
adoRS.Open gstrSQL, gcnOracle, adOpenForwardOnly,
adLockReadOnly, adCmdText
Set crRep_RotaBod = New cr_RotaBod
crRep_RotaBod.ParameterFields(1).AddCurrentValue gstrParameter1
crRep_RotaBod.ParameterFields(3).AddCurrentValue gstrParameter3
crRep_RotaBod.ParameterFields(2).AddCurrentValue gstrParameter4
crRep_RotaBod.Database.SetDataSource adoRS
CRViewer1.ReportSource = crRep_RotaBod
'*** Here the preview is made, and I supouse the query is being re-executed***
CRViewer1.ViewReport
Thanks