Originariamente inviato da Bruno66
Ciao a tutti, ho qst problema. piccolo programma in vb6 (ho eseguito sp6) che usa datareport, in locale funziona, vado ad eseguire l'installazione , va bene, nessun msg di errore ma quando il programma esegue l'istruzione Dr_customer.Show , mi da l'errore:
"errore di run time 713, errore definito dall'applicazione o dall'oggetto"
Ho provato a caricare anche un data report "vuoto", stesso errore, avete qualche idea ?
di seguito codice completo:
'************************************************
Public Function report_customer(lingua)
Me.MousePointer = 13
Dim sorge As String
Dim adorecordset As New ADODB.Recordset
With adorecordset.Fields
.Append "questionario", adVarChar, 50, adFldIsNullable
.Append "domanda", adVarChar, 50, adFldIsNullable
.Append "giudizio", adVarChar, 80, adFldIsNullable
adorecordset.Open
End With
sorge = " SELECT * from cust_gruppi order by id"
Data2.RecordSource = sorge
Data2.Refresh
Do While Data2.Recordset.EOF = False
adorecordset.AddNew
adorecordset![questionario] = Data2.Recordset.Fields("descrizione_gruppo_" & lingua).Value
adorecordset![domanda] = " "
adorecordset![giudizio] = " "
sorge = " SELECT * from cust_quest where id_gruppo = " & Trim(Data2.Recordset.Fields(0).Value) & " order by [id] "
Data10.RecordSource = sorge
Data10.Refresh
If Data10.Recordset.RecordCount > 0 Then
Data10.Recordset.MoveFirst
Do While Data10.Recordset.EOF = False
adorecordset.AddNew
adorecordset![questionario] = " "
adorecordset![domanda] = Data10.Recordset.Fields("domanda_" & lingua).Value
adorecordset![giudizio] = " ( ) 1 ( ) 2 ( ) 3 ( ) 4 ( ) 5"
Data10.Recordset.MoveNext
Loop
End If
Data2.Recordset.MoveNext
Loop
On Error Resume Next
'Data2.Recordset.MoveFirst
Set Dr_customer = Nothing
Set Dr_customer.DataSource = adorecordset
' parametri che dipendono dalla lingua
Dr_customer.Sections("Section2").Controls("Label1" ).Caption = "Categoria"
Dr_customer.Sections("Section2").Controls("Label20 ").Caption = "Domanda"
Dr_customer.Sections("Section2").Controls("Label4" ).Caption = "- Giudizio +"
Dr_customer.Sections("sezione_p_p_r").Controls("La bel7").Caption = "Osservazioni:"
Dr_customer.Sections("sezione_p_p_r").Controls("La bel3").Caption = "Grazie per la Sua Cortese Collaborazione."
Dr_customer.Sections("sezione_p_p_r").Controls("La bel5").Caption = "La Direzione"
Dr_customer.Sections("sezione_p_p_r").Controls("La bel8").Caption = "1 = Scarso 2 = Mediocre 3 = Soddisfacente 4 = Buono 5 = Eccellente"
'Dr_customer.Sections("sezione_p_p_r").controls("L abel13").Caption = ""
'Dr_customer.Sections("sezione_p_p_r").controls("L abel24").Caption = ""
'Dr_customer.Sections("sezione_p_p_r").controls("L abel25").Caption = ""
'Dr_customer.Sections("sezione_p_p_r").controls("L abel26").Caption = ""
'Dr_customer.Sections("sezione_p_p_r").controls("L abel27").Caption = ""
With Dr_customer.Sections("Dettaglio")
.Controls("TextBox1").DataField = "questionario"
.Controls("TextBox2").DataField = "domanda"
.Controls("TextBox3").DataField = "giudizio"
End With
Me.MousePointer = 0
On Error GoTo errore
Call SwitchOrientation(1)
On Error GoTo errore
Dr_customer.Show ' qui viene generato l'errore
Exit Function
errore:
MsgBox Err.Number & ", " & Err.Description
Resume Next
End Function
'*************************************************
Grazie ragazzi.