Create a dataset with SQL

$sql = "SELECT serialno, category, webaddress01, locationlink01 , postaladdress01, contact01 FROM advert01;

I would like to take 6 fields and save them to a dataset so I can print them out in a report.

Can this be done with SQL?

What kind of report? Are you using SSRS? If not, what are you planning to use for the actual report?

If using SSRS then you can either directly create a dataset using the query you have and then create a report that uses that dataset. If using something else it really depends on what it is and if it can communicate directly with the SQL Server or not.

Bob: Thank you for your reply.

I am brand new to the idea of printing reports. In fact I am not sure what a dataset is. I take it that a query might be usable as a dataset for SSRS. I have SQL Server Data Tools 2015 and I have Visual Studio 2017. I have also done a number of SSRS Tutorials. I also have Microsoft Server 2016 Report Builder.

I would like to print a report with a banner header showing the name of our service and the date, then 4 columns of info as per the query. I don't need to do subtotals at the bottom.

If you could give me some general direction on this, I would really appreciate it,