Visual Studio 19 Reporting

Olddude 21 Reputation points
2021-03-01T09:16:40.293+00:00

Hi- I am brand new to VS. I wrote a lot of MsAccess VBA. I am working on a Desktop. I have just installed the free version of VS2019 and created 2 forms and a module, importing Excel data, processing it and storing the processed info in datasets. I then exported the data to an Excel worksheet to create the reports. I want to know how to print a paginated report directly from the Datasets. I imported the SSRS Reporting module into VS but it seems to require SQL Server to be the source of data. Is there another Report Writer that I should use to create a paginated report that I can print directly to printer from the Datasets. Thanks

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
817 questions
{count} votes

Accepted answer
  1. Albert Kallal 4,646 Reputation points
    2021-03-02T21:22:06.157+00:00

    Ok, how this is setup is a bit "strange", but you can indeed use + write + create reports in vb.net desktop.

    In fact, what you wind up doing is creating a report based on a standard called RDL (Report definition lanauge). Becuase they spent all that time and money on building a reporting system for SQL server?

    Well, they took those bits and parts - put in a data layer for vb.net (desktop/winforms) and allow you pump data into those reports. And the nice part is you don't need SQL server or even reporting services. I also use this for asp.net + vb.net (the system is much the same - but you used web based report driver.

    So the first thing to do is to insure that you have the report (bits and parts) above installed. They are actually rather light weight. Once you have the report editor installed, then using Access, SQL server or MySQL as the data source really does not matter.

    Next up:
    That report desinger is BEYOND confusing! - especially coming from Access. I will say with great ease that MS-Access has some great features, but the report writer is simply one of the best we have - and it about 20 years old and much the same back then as it is today (really really nice).

    Ok, so how to get started building and writing and using a reporting system in vb.net?

    First up, you need to install the report controls - this allows you to drop a report viewer onto a standard form, and it takes the RDL report (same format and ones that work on sql server), and render and display it. The results are VERY nice - and a export to PDF, Excel, or word results in 100% perfect rendering of that report in word or excel (this is actually one thing the Access report writer never could do!!).

    So, first up, you need to download and install this VS add-on. vs2019 out of the box to my knowledge does not have the report bits and parts you need.

    So, in your project, got project->manage nuget packages.

    You want to pick this one
    73551-image.png

    Now it is VERY VERY easy to pick the wrong one!!! - you do NOT want the web forms version (well, unless you doing asp.net web stuff).

    Once you do the above?

    Then REALLY but BEYOND really try the first report you make with the wizard. I cannot stress this.

    So, probably best to close and then re-open the project after the nuget install.

    Now, with above in mind? Create a dataset - simple table say a few columns. Save the data set.

    Now create a new form (ctrl-s) save the form - you can leave it on the screen.

    Now right click on project add->new item, and choose this:

    73541-image.png

    Choose you data set, and then you see this:

    73498-image.png

    In above drag all fields into the Values (beyond confusing here - but JUST drag and drop the fields into values for now (walk before we run!!!)

    Then next page - again lets just keep this SUPER simple - don't change anything just this:

    73508-image.png

    finish up. You now be on a report writer page / desinger. Close it (yes to save).

    Now, back to the blank form, add this:

    73476-image.png

    So, drop onto form, and like many things click on the -> that appears on this report view control. You get this:

    73526-image.png

    Choose your report

    Now save the form. Specify this form as the startup - now run your project.

    So the report system has SEVERAL bits and parts. But it is VERY nice, and VERY cool, since you get to use and learn and have a report writer - the same one that all the big boys use, but it works on a simple desktop application. And this includes printing, export to PDF, and works with any data source you setup - even Access or whatever.

    it is a NICE system, but YOU MUST GOODLE or FIND and try a few tutorials since the steps are NOT intuitive, but the system is available, and it works rather well.

    I don't have a tutorial link, but I really REALLY STRONG suggest you google and find one - it not hard, and is easy to setup, but NOT without a few steps and hand holding Once you done it a few times, then you get the hang of this, and you can THEN make a report from scratch and not have to use the wizards.

    Regards,
    Albert D. Kallal (Access MVP 2003-2017)
    Edmonton, Alberta Canada

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Olddude 21 Reputation points
    2021-03-03T05:13:22.593+00:00

    Hi AlbertKallal, Thanks very much - your reply is clear and understandable - I will try.

    0 comments No comments

  2. Olddude 21 Reputation points
    2021-03-03T11:46:22.683+00:00

    Hi AlbertKallal. Thanks. I do currently distribute the MS Access app to about 8 persons who do not have MS Access installed and they have got used to using the "MS Access 360 Runtime " installation. I have had some problems with the compatibility of the MS Access 2016 all and the Access 360 runtime features w.r.t the VBA coded statements but after changing my coding all is working well. Just a very big MS Access app to be distributing (15MB), whereas the VS compiled version seems to be about <1MB.
    That is why I am trying to get a VS version running.


  3. Olddude 21 Reputation points
    2021-03-05T06:04:13.1+00:00

    Thanks for all the help - Appreciated.

    0 comments No comments