问题
I have wpf core 3.1 project and installed Microsoft RDLC Report Designer extention on VS 2019 and created a rdlc file. Now I want to show that rdlc in a window but there is not ReportViewer control. I installed Microsoft.ReportViewer.WinForms v15 package from nuget but it shows error :
"Package 'Microsoft.ReportViewer.WinForms' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project."
How can we show a rdlc in wpf core?
回答1:
Hate to tell you but the answer is: you do not. THere is no known viewer. Please wait until .NET core is no more - which should happen in the unification in .NET 5 towards end of the year.
There is a lot of stuff .NET core has holes in at the moment. You stumbled on one.
回答2:
I wanted print A4 paper for invoice and customer contract , so I forgot ssrs and maked it by wpf print capability : https://github.com/Abel13/Invoice
回答3:
I've the same problem, and my working solution is to replace:
Microsoft.ReportViewer.WinForms
with:
lkosson reportviewercore
回答4:
i had the some prblm but i solved it by adding
Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WinForms.dll to your app folder welcome bro
来源:https://stackoverflow.com/questions/61673864/microsoft-reportviewer-winforms-v15-not-compatible-with-net-core-3-1-how-to-s