Hello, here is my problem
We have an application created with VB6 which launch several CR8 reports (main + subs) based on stored procedures in sqlserver 6.5
We are previewing the report several times whith differents parameters (2 or 3 differents persons for instance)
The main report refresh (so we see 2 differents person infos) BUT not the subs (they always keep the data of the first call).
We don't save data with the reports !!!
here are the code of VB
************************************************************
Private Sub PrintEvaluation(DestinationType As Integer)
With CRptSosaTrg
.StoredProcParam(0) = ""
.StoredProcParam(1) = ""
.ParameterFields(0) = ""
.ParameterFields(1) = ""
.ParameterFields(2) = ""
.ParameterFields(3) = ""
.ParameterFields(4) = ""
.ReportFileName = gsReportPath & "I-FMN-501_evaluation " & sLanguage & ".rpt"
'.ReportFileName = App.Path & "\reports\I-FMN-501_evaluation " & sLanguage & ".rpt"
.StoredProcParam(0) = sArmyNumber
.StoredProcParam(1) = sPromotion
Select Case sPhaseKey
Case cPHASE_EPB
.ParameterFields(0) = "p_ep;" & cPHASE_EP1_5Sqn & ";true"
.ParameterFields(1) = "p_instruc;" & cPHASE_InstVol_EPB_5Sqn & ";true"
.ParameterFields(2) = "p_language;" & sLanguage & ";true"
Case cPHASE_EPAIT
.ParameterFields(0) = "p_ep;" & cPHASE_EP2_7Sqn & ";true"
.ParameterFields(1) = "p_instruc;" & cPHASE_InstVol_EPAIT_7Sqn & ";true"
.ParameterFields(2) = "p_language;" & sLanguage & ";true"
Case cPHASE_IOT
.ParameterFields(0) = "p_ep;" & cPHASE_EP3_11Sqn & ";true"
.ParameterFields(1) = "p_instruc;" & cPHASE_InstVol_IOT_11Sqn & ";true"
.ParameterFields(2) = "p_language;" & sLanguage & ";true"
Case Else
MsgBox "The selected phase is not available, please choose another one" & Chr$(10) & "or contact your system administrator", vbExclamation
Exit Sub
End Select
.Destination = DestinationType
'.Destination = crptToWindow
.DiscardSavedData = False
.ProgressDialog = False
.Action = 1
.StoredProcParam(0) = ""
.StoredProcParam(1) = ""
.ParameterFields(0) = ""
.ParameterFields(1) = ""
.ParameterFields(2) = ""
.ParameterFields(3) = ""
End With
End Sub
***********************************************************
We simply given the parameters to the reports which is linked with the database.
Do you have an answer ???
Thanks for all
We have an application created with VB6 which launch several CR8 reports (main + subs) based on stored procedures in sqlserver 6.5
We are previewing the report several times whith differents parameters (2 or 3 differents persons for instance)
The main report refresh (so we see 2 differents person infos) BUT not the subs (they always keep the data of the first call).
We don't save data with the reports !!!
here are the code of VB
************************************************************
Private Sub PrintEvaluation(DestinationType As Integer)
With CRptSosaTrg
.StoredProcParam(0) = ""
.StoredProcParam(1) = ""
.ParameterFields(0) = ""
.ParameterFields(1) = ""
.ParameterFields(2) = ""
.ParameterFields(3) = ""
.ParameterFields(4) = ""
.ReportFileName = gsReportPath & "I-FMN-501_evaluation " & sLanguage & ".rpt"
'.ReportFileName = App.Path & "\reports\I-FMN-501_evaluation " & sLanguage & ".rpt"
.StoredProcParam(0) = sArmyNumber
.StoredProcParam(1) = sPromotion
Select Case sPhaseKey
Case cPHASE_EPB
.ParameterFields(0) = "p_ep;" & cPHASE_EP1_5Sqn & ";true"
.ParameterFields(1) = "p_instruc;" & cPHASE_InstVol_EPB_5Sqn & ";true"
.ParameterFields(2) = "p_language;" & sLanguage & ";true"
Case cPHASE_EPAIT
.ParameterFields(0) = "p_ep;" & cPHASE_EP2_7Sqn & ";true"
.ParameterFields(1) = "p_instruc;" & cPHASE_InstVol_EPAIT_7Sqn & ";true"
.ParameterFields(2) = "p_language;" & sLanguage & ";true"
Case cPHASE_IOT
.ParameterFields(0) = "p_ep;" & cPHASE_EP3_11Sqn & ";true"
.ParameterFields(1) = "p_instruc;" & cPHASE_InstVol_IOT_11Sqn & ";true"
.ParameterFields(2) = "p_language;" & sLanguage & ";true"
Case Else
MsgBox "The selected phase is not available, please choose another one" & Chr$(10) & "or contact your system administrator", vbExclamation
Exit Sub
End Select
.Destination = DestinationType
'.Destination = crptToWindow
.DiscardSavedData = False
.ProgressDialog = False
.Action = 1
.StoredProcParam(0) = ""
.StoredProcParam(1) = ""
.ParameterFields(0) = ""
.ParameterFields(1) = ""
.ParameterFields(2) = ""
.ParameterFields(3) = ""
End With
End Sub
***********************************************************
We simply given the parameters to the reports which is linked with the database.
Do you have an answer ???
Thanks for all