Buenos das amigos,
tengo un problema.
Tengo un listbox de tipo hierarchical listboxareas con 4 columnas, 1 me indica el nombre del rea, 2 el padre, 3 el nivel
Area 1
Categoria 1
Categoria 2
Subcategoria 1
Subcategoria 2
Area 2
He creado un reporte y en el nombre de datafield, le pongo el nombre del heading que le he metido al listbox (AREA)
Y en el botn he puesto el siguiente cdigo
If ListboxAreas.ListCount=0 Then
Beep
MsgBox(“No hay registros para imprimir.”)
Else
Dim ps As New PrinterSetup
// set the resolution to 300 DPI for printing
ps.MaxHorizontalResolution = 300
ps.MaxVerticalResolution = 300
If ps.PageSetupDialog Then
Dim g As Graphics
g = OpenPrinterDialog(ps, Nil)
If g <> Nil Then
// if the report runs successfully
If rpt.Run(ListboxAreas, ps) Then
rpt.Document.Print(g)
End If
End If
End If
End If
Saliendo el error: There is more than one item with this name and it’s not clear to which this refers
Y no se que estoy haciendo mal.
La otra opcin seria hacerlo en una consulta, pero no se muy bien realizarla en sqllite
Muchas gracias.
Saludos