Salve a tutti,
ho un datareport con dei rpt text box nella section1 associati ai campi di una tabella sql server tramite datafield.
Il codice che creo normalmente adesso mi da come errore ERRORE GENERALE all'apertura del datareport.
Ecco il codice:
Dim cn82 As New ADODB.Connection
Dim rs82 As New ADODB.Recordset
cn82.CursorLocation = adUseClient
cn82.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=miodb;Data Source=PAOLO\SQLEXPRESS"
cn82.Open ConnectionString
If rs82.State = adStateOpen Then rsstampa.Close
rs82.CursorLocation = adUseNone
rs82.CursorType = adOpenStatic
rs82.Source = "select * from tab_fatture where numfatt=" & fatturamano.DataGrid4.Columns(1).Text & ""
rs82.Open , cn82
Set DataReport4.DataSource = rs82
DataReport4.Show
DataReport4.Sections("Section4").Controls("label8" ).Caption = fatturamano.Label21.Caption + " " + fatturamano.Label22.Caption + " " + fatturamano.Label23.Caption
DataReport4.Sections("Section4").Controls("label9" ).Caption = fatturamano.Label52.Caption
DataReport4.Sections("Section4").Controls("label10 ").Caption = "P.IVA - COD.FISCALE: " & " " & fatturamano.Label58.Caption + " " + fatturamano.Label53.Caption
DataReport4.Sections("Section4").Controls("label19 ").Caption = fatturamano.Label58.Caption + " " + fatturamano.Label7.Caption
DataReport4.Sections("Section4").Controls("label21 ").Caption = fatturamano.Text1.Text + " " + "/" + " " + fatturamano.Text2.Text
DataReport4.Sections("Section4").Controls("label4" ).Caption = fatturamano.DataGrid4.Columns(1).Text
DataReport4.Sections("Section4").Controls("label6" ).Caption = fatturamano.dataod.Caption
DataReport4.Sections("Section4").Controls("label16 ").Caption = fatturamano.Label64.Caption
DataReport4.Sections("Section4").Controls("label31 ").Caption = fatturamano.Label65.Caption
DataReport4.Sections("Section4").Controls("label37 ").Caption = fatturamano.Label66.Caption
DataReport4.Sections("Section4").Controls("label39 ").Caption = fatturamano.Label67.Caption
DataReport4.Sections("Section4").Controls("label40 ").Caption = fatturamano.Label68.Caption
DataReport4.Sections("Section4").Controls("label38 ").Caption = fatturamano.Label69.Caption
DataReport4.Sections("Section4").Controls("label36 ").Caption = fatturamano.Label70.Caption
DataReport4.Sections("Section4").Controls("label35 ").Caption = fatturamano.adomanif.Recordset("indicazionequal")
End Sub
come è possibile che lo stesso codice funziona per un datareport e per un altro no? Cosa significa ERRORE GENERALE?
Spero possiate aiutarmi perchè c'è da impazzire...stesso codice usato da un anno e adesso all'improvviso non funziona.
GRAZIE.