Torna al Thread
Dim rpt As New Storico
'indice della riga dove prelevare i dati
Dim row As Integer = stampabolla.labidbolla.Text
'dati cliente
Dim cliente As String = stampabolla.DataGridView1.Item(1, row).Value & " - " & stampabolla.DataGridView1.Item(2, row).Value
Dim indirizzo As String = stampabolla.DataGridView1.Item(4, row).Value
Dim citta As String = stampabolla.DataGridView1.Item(5, row).Value
Dim telefono As String = stampabolla.DataGridView1.Item(6, row).Value
Dim ragsociale As String = stampabolla.DataGridView1.Item(3, row).Value
If indirizzo = "ND" Then
indirizzo = ""
End If
If citta = "ND" Then
citta = ""
End If
If telefono = "ND" Then
telefono = ""
End If
If ragsociale = "ND" Then
ragsociale = ""
End If
Dim daticliente As String = cliente & vbCrLf & indirizzo & " " & citta & vbCrLf & telefono & vbCrLf & ragsociale
rpt.SetParameterValue("Cliente", daticliente)
Dim dal As New DAL
Dim ds As New DataSet
ds = dal.Storico(stampabolla.DataGridView1.Item(1, row).Value)
rpt.SetDataSource(ds)
Me.CrystalReportViewer1.ReportSource = rpt
Me.CrystalReportViewer1.Zoom(70)