Ciao ho un report con diverse sezioni.
Le sezioni le ho chiamate cosi':
Titolo Report Header
Testa Page Header
Dettaglio Detail
Piede Page Footer
Fine Report Footer
In ogni sezione ci sono 11 Label con nome Label_1 ...
Prima di lanciare il report, io ricevo 2 array di dati e in base a questi array (Ubound) so quante label devo far vedere e che valori assegnare ad ogni label ...
Ora in Base al codice che uso (sotto) come faccio ad assegnare valori ad ogni label???
codice:
Sub stampa(Optional ByVal strSQL As String)
On Error GoTo Err_stampa
Dim x As Byte
'Controllo recordset e setto parametri report
If AS400Rs.State = adStateOpen Then AS400Rs.Close
AS400Rs.CursorLocation = adUseNone
AS400Rs.CursorType = adOpenStatic
AS400Rs.Source = strSQL
AS400Rs.Open
Set rptStatistica.DataSource = AS400Rs
rptStatistica.Orientation = rptOrientLandscape
Load rptStatistica
With rptStatistica
'Title
.Sections("Titolo").Controls("lblTitle") = "Ciao"
'Header
For x = 0 To UBound(FormatHeader) - 1
Next
'Footer
End With
rptStatistica.Show 1
Il Codice in Grassetto è una mia prova, ma mi da errore ...