question

Olddude-4567 avatar image
0 Votes"
Olddude-4567 asked ·

Visual Studio 19 Reporting

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

office-vba-devoffice-access-dev
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Olddude-4567 , thank you for taking time to post this issue in Microsoft Q&A forum. For SSRS, I guess you are using MsAccess and the datasets are related to Access? As far as I know, SSRS supports these data source types: Data Sources Supported by Reporting Services (SSRS), so for Access, you may need to consider other ways. Besides, it seems your issue is related to print paginated report from Access datasets, I will help to add office-access-dev and office-vba-dev tag, and engineers who are familiar with Access will give you more professional suggestions.


0 Votes 0 ·

Thanks very much for replying Tianyusun.
Actually the datasets are created within VS 2019, not MS Access. Creation of a report from these internal VS datasets are what I want to do.


I have written data to a Access database, as well but that is actually not what I want to do.
I want to compile the VS project as an App for about 5 persons to use without having to supply them with an Access database as well (they may not have Access on their PC)

0 Votes 0 ·

As a side note?
There is a free "runtime" editon of Access. So, you can compile your MS-Access application down to to a accDE. Then you can install the runtime (a free download).

After that, those users without a full copy of Access can thus use + run the Access application.

However, the runtime does NOT have "most" of the Access built in UI. So the runtime assumes you the developer setup a startup form, and provide forms etc. to "navigate" the application. So this would mean that your application has to work say without using the built in navigation pane etc. However, given that you plan to deploy to other users? Then one would quite much assume that you developed the forms and menus etc for the user to launch reports etc.

So, the free MS-Access runtime is a possible option. It would certainly get you up and running much faster then say learning vb.net and rebuilding such reports.

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


0 Votes 0 ·
AlbertKallal-4360 avatar image
1 Vote"
AlbertKallal-4360 answered ·

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



image.png (435 B)
image.png (19.0 KiB)
image.png (32.4 KiB)
image.png (20.6 KiB)
image.png (16.9 KiB)
image.png (19.3 KiB)
image.png (61.2 KiB)
image.png (64.4 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Olddude-4567 avatar image
0 Votes"
Olddude-4567 answered ·

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

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Olddude-4567 avatar image
0 Votes"
Olddude-4567 answered ·

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.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

No question the .net .exe's are SUPER small. But they do like access require the .net runtimes.

And to be far, Access applications are ALSO rather small. and compiled accDE's do shrink things down a wee bit more.

But, without question .net applications are far more easy to deploy, are much smaller and we CAN in most cases assume the .net runtimes have been installed - not so with Access.

As noted, the report writer in .net is a bear to deal with, but it is nice and the output is rather nice too. We just been spoiled for so long by using the Access one.

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


1 Vote 1 ·
Olddude-4567 avatar image
0 Votes"
Olddude-4567 answered ·

Thanks for all the help - Appreciated.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.