how to use RDLC in visual studio 2022
Asked Answered
M

3

6

Hi I've created a new solution on .net 6 on VS2022 , and now I need to create reports but it looks like there is no way in vs2022. is there a way to use reporting services RDLC files in WPF on VS2002 ?

Mean a while I've open the solution on VS2009 in order to use it for building RDLC reports, but when I try to associate the data source to an Object I got this error enter image description here

My object is a Class in a referenced project (class library .net6) the class is:

   public  class prueba
    {
        public int MyProperty { get; set; }
        public int prop2 { get; set; }
        public int prop3 { get; set; }
    }
Mendenhall answered 1/3, 2022 at 1:19 Comment(1)
Please @Mendenhall if you find any solution to this, let us know.Niccolo
C
0

To solve this I have added Visual Studio DataSet object rather than using my reference project dataset.

enter image description here

Configure the dataset exactly as my custom dataset.

enter image description here

Now, this dataset is available to work in RDLC report, rest of the work has been done in my code behind to fill the VSDataSet.

enter image description here

Hope this will help you.

Canakin answered 11/7, 2023 at 13:51 Comment(0)
A
6

There is now a RDLC Report Designer Add-In for Visual Studio 2022.

To use those reports in your application, you need an RDLC renderer (aka "Microsoft ReportViewer"), which is available for .NET 4.0-4.8 as a nuget package:

Do note, though, that Microsoft did not release a ReportViewer for .NET Core or .NET 5+, and they have announced that do not intend to release one in the future (see, for example, the comments on this blog post).

There are some enthusiast ports/recompilations floating around on github and nuget, but they are not from Microsoft, nor has Microsoft given them permission to do that, so using those packages carries a certain amount of technical and legal risk. That's not something you want to do in a commercial project.

Agora answered 16/5, 2022 at 20:17 Comment(0)
N
1

You only can use projects with netstandard, 2.0 or 2.1

so the class you will use as a data source only can be in a project using .NetFramework or netstandard.

Niccolo answered 16/5, 2022 at 19:58 Comment(0)
C
0

To solve this I have added Visual Studio DataSet object rather than using my reference project dataset.

enter image description here

Configure the dataset exactly as my custom dataset.

enter image description here

Now, this dataset is available to work in RDLC report, rest of the work has been done in my code behind to fill the VSDataSet.

enter image description here

Hope this will help you.

Canakin answered 11/7, 2023 at 13:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.