How to use ReportViewer 2012 in Visual Studio 2013 (WinForms/Wpf) - reportviewer

I would like to upgrade a project which uses RDLC to create reports. The solution uses Report Viewer 2010SP1.
I installed successfully the report viewer 2012 runtime, however the component does not appear in the add references windows of visual studio.
I also checked the NuGet-Packages and there I found a “Report Viewer”-package 11, but while installing this version, only the web-component but not the WinForms-component has been installed.
On the web I have seen some workarounds changing the registry, but is it really necessary to manually change the registry to have this done?

One way, probably not the best, is selecting the component directly with the "browse"-option.
In the “Add Reference” dialog, browse to “\Program Files (x86)\Microsoft Visual Studio 12.0\ReportViewer” and select there the component "Microsoft.ReportViewer.WinForms.dll"

Related

I cannot access the Excel interop from my VB program

I have had to replace my laptop. One of the applications I have needed to install is Visual Studio Community 2019 since I rely on some programs which I wrote in VB. My memory of the 2015 version is that I just installed it. With the 2019 version, I must specify which components I need. Given how many components are available, I can see why they cannot install everything. I need access the Excel interop and have downloaded every component that might give access to the interop without any apparent success. The statement Imports Excel = Microsoft.Office.Interop.Excel gives the error “{) Namespace Microsoft. Namespace or type specified in the Imports ‘Microsoft.Office.Interop.Excel’ does not contain any public member or cannot be found.”
Searching for help, I found: “to use the features of a Microsoft Office application from an Office project, you must use the primary interop assembly (PIA) for the application.” For my 64-bit computer, these should, apparently, be installed in “%ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\”.
I find that folder “C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\” contains subfolders “Office14” and “Office15”. Each of these subfolders contains a different set of PIAs. Both contain “Microsoft.Office.Interop.Excel.dll” with the Office 14 version dated 31Mar2015 and the Office 15 version dated 7Oct2015.
I use Office version 15. Should I move the PIAs I want from folder “PIA\Office15” to folder “PIA” or have I misunderstood something else?
You can try to install the Nuget package Microsoft.Office.Interop.Excel form Nuget Package Manager.
First, right click the project and select Manage NuGet Packages....
Then type Microsoft.Office.Interop.Excel in the search bar and install it:
Kyle Wang’s answer allowed me to solve my problem. However, his images and descriptions differed from my experience with Visual Studio 2019. I suspect he uses an earlier version. This answer documents my experience with Visual Studio Community 2019 in the hope that other can benefit from my troubles.
With Visual Studio 2015, the version I have been using, only Visual Studio is installed. With Visual Studio 2019, Visual Studio Installer is also installed.
If I open Visual Studio Installer I see:
If I click Modify, I see:
If I scroll down a little I see:
The blue ticks in the righthand corner identify the workloads I have already installed.
If I click Individual Components, I see:
I am unsure which components were downloaded because they were included in a selected workload and which were downloaded because I selected every component that might include the Excel InterOp I was looking for. I will probably uninstall Visual Studio and re-install now I know what I need.
If I scroll down enough, I see:
I definitely needed to download NuGet package manager if I want access to the Excel InterOp. I do not know if I needed NuGet targets and build tasks. If I re-install Visual Studio I will try without NuGet targets and build tasks and update this answer to report if it is needed. I have not found any documentation describing the significance of these components, so it seems you need to experiment to determine what components you need.
Once you have selected the workloads and or individual components you want, click Modify in the bottom righthand corner. A progress screen is displayed while the installation is performed. When it has finished, close Visual Studio Installer.
Open Visual Studio 2019 and then create or open the solution that requires the Excel InterOp. The fourth tab in the top row is Project. Click it. The bottom but one line in the dropdown menu is Manage NuGet Packages…. Click it. You will see:
Click Browse to get:
https://www.nuget.org/ claims they hold 2,031,503 versions of 181,450 unique packages. As far as I can tell, they are displayed in order of download numbers. For example, Newtonsoft.Json has been downloaded 320.5 million times. To find any particular package you must use search. Searching for “microsoft.office.interop” reduces the list to something manageable with the Excel Interop at the top. Select the package you need and click Install on the right.

Missing Microsoft RDLC Report Designer in Visual Studio

In Visual Studio 2015, I cannot find the designer for RDLC reports anymore. Does anyone know if this is only a bug and if it is provided later on or if Microsoft wants to kill the RDLC or if they want us to use an external designer and when, which designer this is?
Update
For developpers searching for the RDLC Report Designer in Visual Studio 2017,
it must be now downloaded from the Visual Studio Marketplace
Visual Studio 2017 and newer
The RDLC Report Designer can be found on the Visual Studio Marketplace:
for Visual Studio 2022
for Visual Studio 2017 - 2019
Besides that, the ReportViewer Control, which is the runtime requirement for showing reports in ASP.NET or Windows Forms Applications, is now available through NuGet. See here for details.
Visual Studio 2015
The Report Designer is part of the Microsoft SQL Server Data Tools.
You can add it using the Visual Studio setup (Programs and Features > Visual Studio 2015 > Change)
In VS 2017, i have checked SQL Server Data Tools during the installation and it doesn't help. So I have downloaded and installed Microsoft.RdlcDesigner.vsix
Now it works.
UPDATE
Another way is to use Extensions and Updates.
Go to Tools > Extensions and Updates choose Online then search for Microsoft Rdlc Report Designer for Visual studio and click Download. It need to close VS to start installation. After installation you will be able to use rdlc designer.
Hope this helps!
Open Control Panel > Programs > Programs and Features
Select the entry for your version of Microsoft Visual Studio 2015. In our case, it was Microsoft Visual Studio Enterprise 2015.
Click the "Change" button on the top bar above the program list.
After the splash screen, a window will open.
Press the "Modify" button.
Select Windows and Web Development > Microsoft SQL Server Data Tools, and check the box next to it.
Press the "Update" button on the lower-right hand side of the window.
Once the installation is complete, open your version of Visual Studio. After the new .dll files are loaded, Reporting functionality should be reimplemented, and you should be able to access all related forms, controls, and objects.
Visual Studio 2017
Open Visual Studio
In Tools -> Extensions and Updates -> Online
Search for 'rdlc'
Install Microsoft Rdlc Report Designer (23.3 MB)
Close Visual Studio, let the installer run and open Visual Studio to see the rdlc in the designer.
I had the same problem, after install the MS VS Community 2015, I didn't find the RDLC files neither the Report Viewer component, I solve the problem by going in the Control Panel (Windows) -> Programs -> Try to uninstall the MS VS Community and choose MODIFY, in this moment you will be able to Check the Microsoft SQL Server Data Tools.
That is it!
In addition to previous answers, here is a link to the latest SQL Server Data Tools. Note that the download link for Visual Studio 2015 is broken. ISO is available from here, links at the bottom of the page:
https://msdn.microsoft.com/en-us/library/mt204009.aspx
MSDN Subscriber Downloads do not list the VS 2015 compatible version at the time of writing.
However, even with the latest tools (February 2015), I can't open previous version of .rptproj files.
I've had the same problem as you and I installed Microsoft rdlc designer to solve my problem.
And if you already installed this but still can't found rdlc designer try open visual studio > tools > Extension and Updates > then enable Miscrosoft Rdlc designer extensions.
If you did a custom installation you need to add Microsoft Sql Server Data Tools. After that you can add Reportviwer to your webform.
To solve this problem open nutget package manager console and select your project and type install-package microsoft.report.viewer and wait to install
The setup feature does not work on Visual Studio 2017 and later versions.
The extension needs to be downloaded from VS Marketplace and then installed -
Link
The same applies to other extensions such as Installer Projects (used for creating executable files) - Link
Below Different tools for Editing Rdlc report:
ReportBuilder 3.0 : Microsoft Editor for Rdlc report.
Microsoft® SQL Server® 2008 Express with Advanced Services: Another tool is to use Sql Server Business intelligence for reporting that can be installed with Sql Server Express with Advanced Sevices.
fyiReporting: It is opensource tool presented for editing Rdlc reports .
This trouble passed me. If you can't repair this trouble, perhaps can you review all Framework versions that you have in your system. For example, if you have ReportViewer for Framework 4.5 and your project is assembly in Framework 2 or another Framework minor at 4.5. The differents versions Framework sometime have problems.
Use Extensions and Updates.
Go to Tools > Extensions and Updates > choose Online then search for Microsoft Rdlc Report Designer for Visual studio and click Download.
It needs to close your VS to start installation.
After installation you will be able to use RDLC designer.

the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first

I have a small windows forms application created in Visual Studio 2012 that uses ReportViewer version 11.0.0.0.
The application target framework is .NET 4.0 and its deployment method is ClickOnce
On my PC it installs but on client machines, intallation fails with error
the application requires that assembly microsoft.reportviewer.processingObjectModel version 11.0.0.0 be installed in the global assembly cache first.
On the client machines, i have installed
.NET 4.0
ReportViewer 2010
Microsoft Report Viewer 2012 Runtime CTP
SQLSYSCLRTYPES.msi
in the project application files settings, i have set microsoft.reportviewer.processingObjectModel publish status to Include(Auto), in the references i have also set its Copy Local property to True.
what am i missing?
I have even followed the instructions here http://msdn.microsoft.com/en-us/library/ms251723.aspx
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Goto the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Goto "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
you are missing the ProcessingObjectModel.dll file find the version 11.0.0.0 in gac assembly C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel and add it to bin dir.
We had the same issue, but the thing is, its automatically adding it to the references (microsoft.reportviewer.processingObjectModel), if u EXCLUDE it from the publishing properties(properties->publish->application files), It might fix it.
A better option would be to install the Microsoft Report Viewer 2010 SP1 Redistributable Package at:
http://www.microsoft.com/en-us/download/details.aspx?id=6610
Your users will need to have this package installed as well. If you just copy and paste a MS DLL, you'll have to redeploy it every time you upgrade your application.
If you are using WinForms, to me it seems pointless to worry about installing this DLL in the GAC when it's being used for a report viewer that is deployed via click-once. This isn't a big file and you're probably using it as a report viewer control on a form, nothing more. One possible solution is to do the following:
In Visual Studio, go to the reference in your project for the assembly Microsoft.ReportViewer.ProcessingObjectModeland locate the file path to the folder for that assembly. Mine was version 12 and so my file path was C:\windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\12.0.0.0__89845dcd8080cc91
Copy the file path of the folder the assembly is in and remove the reference from your project (right click the reference and select "Remove").
Win + R to get a 'Run' prompt. Paste that folder path in there and execute to jump right into the folder of that DLL.
Find the DLL, it should be the only file in that folder, and copy it to your Visual Studio project folder. You shouldn't care about 100kb of extra space on your drive consumed, and I don't think this DLL is one you'll need to update.
Back in Visual Studio, right click References, Add Reference, and browse for that DLL in your project folder. After adding the reference, make sure that the Copy Local property is set to true.
Clean and rebuild, test the application on your local computer, than Deploy your ClickOnce again.
Now when users install your application with ClickOnce, the reference will not refer to the GAC at all and there won't be any need to rely on the prerequisite check/installation process for this DLL because you have included it directly in your published application.
It depends on the setup type you are using but basically, it means the required library is missing from your server or computer. To enable the application to download from the server (In a client-server architecture), you need to include the file(s) in the project.
Go to your application option and locate the "Publish" tab
Click on "Application files"
In the ensuing dialog, select to include all the libraries you want included (or that are required to run your application on the client machine and click "Ok")
Build your application and then publish to the server.
I hope this works for you, it worked for me in Visual Studio 2010 Professional
In case of Windows 10 it won't work installing Microsoft Report Viewer 2010 SP1 as describe by user1236560. First you need to install Prerequisites for SQL Server Management Objects (SQLSysClrTypes.msi) need to choose between x86 and x64 depending on your hardware. You could find it on: http://origin.www.ms.akadns.net/downloads/en/details.aspx?FamilyID=16BC778C-357B-46E9-8356-D575903AC831
After that you need to install MICROSOFT® REPORT VIEWER 2012 RUNTIME that you could find on: https://www.microsoft.com/en-us/download/details.aspx?id=35747
Both of this package will have to be installed.
I encountered this error
System Update Required
Unable to install or run the application. The application requires that assembly
Microsoft.ReportViewer.ProcessingObjectModel Version 11.0.0.0 be installed in the Global Assembly Cache (GAC) first.
Please contact your system administrator.
this error popped out when installing an application made from Visual Studio
meaning I am one of the client
I have Visual Studio 2015 and a Microsoft SQL Server 2014 and didn't know about Crystal Reports and other related stuff to it. I do check the version of my .NET Framework which is version 4.6.2.
I have several extension files and distributable files downloaded and yet doesn't solve my problem.
I do not know if I solve the problem generally but I do become successful in installing the application
so I downloaded and installed the ff:
SAP Crystal Report for Visual Studio 2015(latest, just to make sure)
Microsoft System CLR Types for Microsoft SQL Server 2012
Microsoft Report Viewer 2012 Runtime.
the problem took me about 2 days to trouble shoot, Be careful on downloading and installing extension files and distributed files cause it will munch some space too.
The Best answer is:
Here is (arguably) the best way to deal with this issue... without downloading or installing any extras. This worked with Visual Studio 2012 (Ultimate)
Go to the main project within your solution(default/statup project)
Right Click and Click Properties / Select "Your Project">> Project>> Properties
Click on "Publish" Tab to see publishing options
Go to "Install Mode and Settings">> Click "Application Files" and Dialog opens
Go down and look for the items set with "Publish Status" > Prerequisite
You will find ReportViewer and Several Other Files set to Prerequisite
Change all the Publish Statuses to "Include" in the drop down.
I know you only need the ReportViewer Only but this will eliminate other potential problems I came across
Now all the required files will be added to your installation setup good to go!
For interest, you can change include a desktop icon under "Install Mode and Settings">>Options>Mainfests>Create Desktop Short Cut
It reduced all of my head aches.

Upgraded WinForms project from VS2005 to VS2012. Now my ReportViewer DLLs are missing

I got a copy of a Visual Studio 2005 project from a friend. The project referenced the DLLs Microsoft.ReportViewer.Common and Microsoft.ReportViewer.WinForms. On my machine I have Visual Studio 2012. I upgraded the project. The references to these DLLs are broken, understandably, because they are Windows locations, not in the VS project. So, I want to delete the references and re-create, but I cannot find the DLLs on my machine. Do they not get installed with Visual Studio 2012? Can I download them?
I got a copy of a Visual Studio 2005 project from a friend
Which explains the problem, the target .NET version of your project is 2.0. The ReportViewer included with VS2012 requires at least 3.5.
Fix it with Project + Properties, Application tab, Target Framework combobox. You'll then find the ReportViewer control back under the "Reporting" header in the toolbox.
These have been replaced by Report Server. Though if you'd copy them over from your VS2005 machine you should still be able to use them as binary references in your solution. You can download the binaries from the MSDN Download site.
Though there should be binaries for Visual Studio 2012 as well. I suspect they will get installed when you install the SQL Server Development tools, which include the SQL Server Reporting Server components.
You can try to use the Redistributable package for Visual Studio 2010.

How I can use ReportViewer with VS Express

I have no money to buy Visual Studio so I use the express edition
I want to use Microsoft ReportViewer
Is it legal to use ReportViewer without buying VS and how?
i had some luck installing the Microsoft Report Viewer 2010 Redistributable Package (from above) and then:
going to the form designer
right clicking on the toolbox and clicking add items
browsing for the DLL (which is located at C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WinForms.dll
report viewer should then be available from the toolbox
There is a Microsoft Report Viewer 2010 Redistributable Package
I'm unsure whether this means you can use it in visual studio, nor am I certain about the licensing.
I haven't used express edition for a little while. I'm guessing the control is in the download, you could try adding one of the dll's as a control.
I believe that you can use Reporting Services in SQL Server Express (which is free), which might indicate the validity of using ReportViewer in vs express.