Print Forms RRS feed

  • Question

  • Hello, I am trying to figure out how to create a custom print form that I can pass data into in order to print. I am working on replacing an Access (VB) Database application with a MySQL Database running behind C# Windows Forms. Essentially I a trying to replicate the "Reports" function of Access within Visual Studio. I need to be able to print, save, and edit the reports like you can on Access. From what I have been told I need to use some type of third party print controller, but I don't really know what I am looking for.

    Any help would be much appreciated.

    Monday, February 17, 2020 6:35 PM

All replies

  • Have only used this for SQL-Server but should work with MySQL, its free.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    Tuesday, February 18, 2020 1:47 AM
  • should work with MySQL

    I can confirm that it does work with MySQL.

    In fact, you "feed" the report with a DataSet, and it doesn't care about how the data came to be in the DataSet. You can populate the DataSet using any code that you know how to write in C#, which of course includes using a MySqlDataAdapter, and your ReportViewer will happily display and/or print the data regardless of where it was read from.

    However, at design time, the report designer requires a Typed Dataset in order to show the columns in the designer. It doesn't need to be the same DataSet that provides the data at runtime, but it needs to have the same columns. You may need to create the DataSet manually if you are connecting to a data source that Visual Studio does not understand (MySQL should be OK if you have installed its drivers).

    Tuesday, February 18, 2020 1:47 PM