However, in the new project, I get a JS exception: "Microsoft is undefined".
First, I tried to use the new version 12 of ReportViewer, which I installed on the machine. I added the references under C:\Windows\assembly\GAC_MSIL, all in version 12. And I also adapted the Web.Config and the references in the aspx-files. At this point,
I didn't know what to use as PublicKeyToken. I found something on the net. But I always got the error "Microsoft is undefined", even after cleaning and recompiling the project.
Then, I wanted to resign and move to version 11. I changed everything: the references, the Web.config and the aspx-files. But I keep getting this error.
I believe I do not understand the dependencies. Could someone please help me out of this?
I tried to use the new version 12 of ReportViewer, which I installed on the machine. I added the references under C:\Windows\assembly\GAC_MSIL, all in version 12.
From your description above, please check following items:
1. Make sure you download and install REPORT VIEWER 2015 RUNTIME properly.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
1. Make sure you download and install REPORT VIEWER 2015 RUNTIME properly.
Ok, using your download link I noticed that there is a newer version. I downloaded it and installed it.
Angie xu - MSFT
2. These apply to installing anything into the GAC.
Do I have to install anything manually into the GAC? Or how is the new version of ReportViewer available in MSVS?
The last time I installed ReportViewer, I had to add the DLLs under C:\Windows\assembly\GAC_MSIL manually.
But besides that, even with the older ReportViewer, I had a working project and I didn't manage to make a new project working the same way.
I believe that I am doing something wrong when creating an aspx-page with ReportViewer.
Here is a detailed description of what I do when creating a new project that uses ReportViewer. I am sure I am doing something wrong:
Create a new ASP.NET project/solution based on Web Forms in MSVC.
Copy a existing, working(!) report (aspx + rdlc) from another project into the new project.
(The existing report references ReportViewer 11).
When I try to open it, I get an error, because there are no references to ReportViewer yet.
"The type or namespace name 'Reporting' does not exist..."
Then, I go to Project -> Add reference..."
In the "Extension" tab there are three items related to ReportViewer (Common, WebForms, WinForms), but all at version 10.0.0.0.
So these cannot be the references I have installed lately.
Then, the only thing I still can do is "Browse" and select some DLLs from the hard disk.
This is somewhat unreliably, because I don't know anything about the locations of the files I installed when I installed ReportViewer.
I can only guess or google. So I try to avoid it at the first time. I make another test instead:
I create a new WebForm and drag a ReportViewer item from the toolbox on it
This creates a "Register" tag in the WebForm and three entries in Web.config:
These must be wrong, because I installed the newest ReportViewer, which should be version 12, and there exist folders under C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.*, e. g. Common\12.0.0.0__89845dcd8080cc91, so we should have at least version
12 available.
So dragging from the toolbox does not help.
However, I also tested the existing reports (which use version 11) from the other project with this version 11 of the ReportViewer: I get the following error message:
Unhandled exception at line 390, column 5 in http://localhost:49980/TestReport.aspx
0x800a1391 - JavaScript runtime error: 'Microsoft' is undefined
Then, I remove the entries in the Web.config and return to the "Add reference" panel. This time, I go to "Browse" and select files from the hard disk:
When, when I open the existing report from the other project (which references version 11), I get an incompatibility error:
The base class includes the field 'ReportViewer', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer).
I know this must be because I added the reference for version 12, but the report references version 11:
I change the version in the Register tag to "12.0.0.0, and I leave the value for PublicKeyToken as is, because I don't know another value.
Then, I again get "Microsoft is undefined".
At this point, I don't know how to go any further. I cannot believe that you have to collect individual DLLs somewhere on your hard disk. Instead, the ReportViewer should be somewhat "registered" in MSVS, so that you get version 12 reports when you drag
one from the toolbox.
I really don't know what else to try. But I hope, the description above is detailed enough so that someone can see what I am doing wrong.
Member
33 Points
425 Posts
Problems with ReportViewer
Oct 11, 2015 09:44 AM|Yeoman|LINK
Hello,
I have a project using ReportViewer,which is working fine.
But I failed creating another project using the same code.
The original, working project uses the following References:
All references are at version 11.0.0.0.
The web.config contains these lines:
The aspx-files using it contain this line:
However, in the new project, I get a JS exception: "Microsoft is undefined".
First, I tried to use the new version 12 of ReportViewer, which I installed on the machine. I added the references under C:\Windows\assembly\GAC_MSIL, all in version 12. And I also adapted the Web.Config and the references in the aspx-files. At this point, I didn't know what to use as PublicKeyToken. I found something on the net. But I always got the error "Microsoft is undefined", even after cleaning and recompiling the project.
Then, I wanted to resign and move to version 11. I changed everything: the references, the Web.config and the aspx-files. But I keep getting this error.
I believe I do not understand the dependencies. Could someone please help me out of this?
Thanks
Magnus
All-Star
32817 Points
3815 Posts
Re: Problems with ReportViewer
Oct 13, 2015 05:50 AM|Angie xu - MSFT|LINK
HI Magnus,
From your description above, please check following items:
1. Make sure you download and install REPORT VIEWER 2015 RUNTIME properly.
https://www.microsoft.com/en-us/download/details.aspx?id=45496
2. These apply to installing anything into the GAC.
https://msdn.microsoft.com/en-us/library/dkkx7f79%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
Please let me know if you need help.
With regards,
Angie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
33 Points
425 Posts
Re: Problems with ReportViewer
Oct 13, 2015 11:16 AM|Yeoman|LINK
Hello Angie!
Ok, using your download link I noticed that there is a newer version. I downloaded it and installed it.
Do I have to install anything manually into the GAC? Or how is the new version of ReportViewer available in MSVS?
The last time I installed ReportViewer, I had to add the DLLs under C:\Windows\assembly\GAC_MSIL manually.
But besides that, even with the older ReportViewer, I had a working project and I didn't manage to make a new project working the same way.
I believe that I am doing something wrong when creating an aspx-page with ReportViewer.
Thank you
Magnus
Member
33 Points
425 Posts
Re: Problems with ReportViewer
Oct 15, 2015 01:37 AM|Yeoman|LINK
Hello,
I am still totally stuck, please help!
Here is a detailed description of what I do when creating a new project that uses ReportViewer. I am sure I am doing something wrong:
(The existing report references ReportViewer 11).
"The type or namespace name 'Reporting' does not exist..."
So these cannot be the references I have installed lately.
This is somewhat unreliably, because I don't know anything about the locations of the files I installed when I installed ReportViewer.
I can only guess or google. So I try to avoid it at the first time. I make another test instead:
This creates a "Register" tag in the WebForm and three entries in Web.config:
So dragging from the toolbox does not help.
However, I also tested the existing reports (which use version 11) from the other project with this version 11 of the ReportViewer: I get the following error message:
Then, I again get "Microsoft is undefined".
At this point, I don't know how to go any further. I cannot believe that you have to collect individual DLLs somewhere on your hard disk. Instead, the ReportViewer should be somewhat "registered" in MSVS, so that you get version 12 reports when you drag one from the toolbox.
I really don't know what else to try. But I hope, the description above is detailed enough so that someone can see what I am doing wrong.
Please help!
Thanks
Magnus