Hello,
I created a report (att. 2) in which there should be a grand total in the footer but when I run it I get an error saying non such a column name. Without this field everything runs fine.
I followed the exact same coding in the example “Breaking list of orders” in which all things work and values are shown with the correct formatting, something it doesn’t work in my app.
Var sql As String = "SELECT banca, dataBon, dist, impor FROM bonif "
Var rpt As New RptBon
// Now we select the records from the database and add them to the list.
Var bnf As RowSet
bnf = App.DB.SelectSQL(sql)
If bnf = Nil Then
MessageBox("No records found to print.")
Else
Var ps As New PrinterSetup
// set the resolution to 300 DPI for printing
ps.MaximumHorizontalResolution = 300
ps.MaximumVerticalResolution = 300
If ps.ShowPageSetupDialog Then
Var g As Graphics
g = ps.ShowPrinterDialog()
If g <> Nil Then
// if the report runs successfully
If rpt.Run(bnf, ps) Then
rpt.Document.Print(g)
End If
End If
End If
End If
Thanks for any help