To connect to a database and execute SQL statements, you can use the JDBC facilities.
Search the forum for samples.
Once you have the data, you could display it using a RichTextBox.
RichTextBox is one of Jabaco's control types which can be placed in a form.
RichTextBox.Parent is an object derived from JComponent.
There is a Print() method available, but it certainly takes some reading and experimentingto get this to work.
Google is your friend!
My preferred way is to create a HTML text file as report and display it using a web browser.
The browser is started using the "Shell()" method.
From there the user can then print.
For your inspiration, you can find attached a class to create HTML (including VML for graphics and using CSS styles)
A last alternative would be to use a framework like iText and create a PDF file as report.
Such a file can then be viewed or printed.
Long answer short: Creating printable reports takes some reading and experience.
Post your findings here!
Greetings
A1880
mdlHtml.jsrc.txt