Hi, the 0, 1, 2 SelectedSegmentIndex queries work properly (with real table Notifiche), the latter 3 (coming from a virtual table cNotifiche) passes only field numbers in report and not the other strings value (putting 0 in all the rest of the fields of the report).
The database is the same.
The data are correctly saved into cNotifiche.
The query (3) works ok when add the data in a listbox, why then with the report not works properly ?
Any idea on why it not works ?
Var sql as String Var rows As RowSet If SBMostra.SelectedSegmentIndex = 0 then sql = “SELECT * FROM Notifiche” rows = DB.SelectSQL (sql) End If If SBMostra.SelectedSegmentIndex = 1 then sql = “SELECT * FROM Notifiche WHERE Notificato = ‘NO’ ;” rows = DB.SelectSQL (sql) End If If SBMostra.SelectedSegmentIndex = 2 then sql = “SELECT * FROM Notifiche WHERE Notificato = ‘SI’ ;” rows = DB.SelectSQL (sql) End If If SBMostra.SelectedSegmentIndex = 3 then If rbParolaEsattaSI.value = true then sql = “SELECT * FROM cNotifiche WHERE cNotifiche MATCH ?” rows = DB.SelectSQL (sql, txt5Cerca.text) End If If rbParolaEsattaNO.value = true then sql = “SELECT * FROM cNotifiche WHERE cNotifiche MATCH ?” rows = DB.SelectSQL (sql, txt5Cerca.text + “*”) End If End If Dim rpt As New repArchivio Dim ps As New PrinterSetup dim info as new NSPrintInfoMBS(ps.SetupString) dim printers() as string = NSPrinterMBS.printerNames dim printer as NSPrinterMBS = NSPrinterMBS.printerWithName(“SHARP”) info.printer = printer ps.SetupString = info.SetupString Dim g As Graphics g = ps.ShowPrinterDialog If g <> Nil Then If rpt.Run(rows, ps) Then rpt.Document.Print(g) End If End If