on 11-18-2022 5:47 PM
Hey, all - please forgive my inexperience with this, but I don't know what else to do but ask at this point.
I have a web form that I'm trying to drop the CrystalReportViewer control onto in VS2022. However, on each add, it results in just a grey box with the following message:
Error Creating Control - CrystalReportViewer1
Method not found: 'Void CRVsPackageLib.ICRVSConfigWebFile.AddAssemblies(CRVsPackageLib.IServiceProvider, EnvDTE.ProjectItem)'.
I was previously able to successfully create a working report generator in a Windows Forms app.
Any idea what I might be missing? I'm at a loss, and any advice will be greatly appreciated.
You should not have "place" the Viewer manually, if it's not there then you don't have rights to install software or your AV software is blocking the installer.
What version of Windows are you using?
IIS and Visual Studio must be installed before installing CR for VS
Then right click on the Installer and select Run as Administrator:
CR for Visual Studio SP32 64b installer (VS 2022 and above)
Click OK to get the 32 bit runtime installed so you can select X86 or X64 in project Properties.
In the Toolbox select Choose Item and select the CR Viewer.
mmm... interesting, I'm getting the same error now when dropping the Viewer onto the form.
Ignore it and then run the App... It works...
I'll have to ask R&D what's up... I did add that Lib file to the project, made no difference...
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
That's the problem then, that folder gets installed when you install the EXE.
Try reinstalling it and be sure to right click on the EXE and select "Run as Administrator"
If it's still not there then likely cause is you AV or Firewall software is blocking it.
Until you get it installed your app isn't going to work.
And copy just the Viewer folder into your project.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, my mistake - I DID have an inetpub directory structure on C: that I was unaware of.
So, to clarify, I copy this directory:
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13\
...into my project - but to the root folder? Where in my project should this directory reside? And are there any additional references to update once its in place?
Thanks again!
I went ahead and followed some instructions (found elsewhere) that said to place the crystalreportviewers13 folder in the same structure. So, I now have it placed in .\aspnet_client\system_web\4_0_30319\ in my project. Unfortunately, after a clean and rebuild, and restarting VS, the error persists.
I'm going to try another reinstall in the meantime. I'm starting to feel like this may just be a bad install.
Not the right one, it's WEB so you need the WEB Viewer here:
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319
Copy the whole CR folder into your project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don,
I don't have an aspnet_client folder in my inetpub directory structure. Is this a path that I will need to create manually?
Also, when you say the whole CR folder, do you mean
A) C:\Program Files (x86)\SAP BusinessObjects\
B) C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0
or some specific subdirectory of those?
Thanks again for your help. This is incredibly frustrating.
Copy the CRViewer folder into your project, that may fix it.
Are you testing with IISExpress or IIS?
Can you view the report in VS?
In VS and your form does it show the embedded viewer on your page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've copied C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\Crystal Reports 2011\crystalreportviewers into the bin folder of my project and rebuilt, but no luck.
I'm testing with IISExpress.
I don't know if I can view the report yet or not, since the control won't load properly.
VS does not show the embedded viewer. Only a gray box with the error message in my OP.
Thanks for your help!
See my Blog on upgrading your project:
VS can be a pain sometimes, it doesn't always redirect to the correct references..
Be sure to set Copy Local to False for all CR assemblies, if you have any in your \bin folder it will cause problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don,
This is a brand new installation, so there aren't any old references hanging around. All of my CR assemblies are pointed to 13.0.4000.0. I read through blog post for clues as to something I might have missed, but nothing stood out.
However, I did set Copy Local to False for all CR assemblies, and removed the ReportEngine dll from my bin folder (which was the only one that had copied locally apparently). But still no dice. 😞
Did you download and install the 64-bit version of SP32 of the Crystal for Visual Studio SDK? If not, you need to do that. You can find it through the wiki. You need to make sure you download the "install package", which is a .exe file. All of the other downloads are for various versions of the runtimes that you use only when deploying your application.
Once you've downloaded the installer, make sure that
1. Visual Studio is not running.
2. You need to right-click on the installation .exe and select "Run as administrator" in order for the integration with Visual Studio to install correctly.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
I encountered same issue with you. Did you solve this problem yet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adam,
I encountered same issue with you. Did you by any chance solve the problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use ProcessMonitor and look to see where IIS is attempting to load the viewer from.
Usually adding the viewer to the project resolves the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.