HI
I'm trying to write a simple Telerik Reporting project but met some diffcults :
New > Project > ... > Telerik C# ASP.NET MVC Application
New > New Item > ... > Telerik MVC Report Viewer Page Q2 2015 (Sample report definition)
Build the project there have no any failed :
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
But the Error List show lots of errors after open ReportViewerView1.cshtml :
Error CS0103 The name 'ViewBag' does not exist in the current context CSharp.MvcDemo C:\Program Files\Telerik\Reporting Q2 2015\Examples\CSharp\MvcDemo\Views\Home\Index.cshtml 6
...
...
Error CS1061 'HtmlHelper' does not contain a definition for 'TelerikReporting' and no extension method 'TelerikReporting' accepting a first argument of type 'HtmlHelper' could be found (are you missing a using directive or an assembly reference?) CSharp.MvcDemo C:\Program Files\Telerik\Reporting Q2 2015\Examples\CSharp\MvcDemo\Views\Home\Index.cshtml 202
And the errors disappears after close ReportViewerView1.cshtml.
Why ? The bug of Visual Studio 2015 ??
Then move the \ReportViewerView1.cshtml into Views/Home, rename to Index.cshtml, the runtime error occurred after Start Debugging :
... CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' not contains 'TelerikReporting' ...,... 'TelerikReporting' 來接受類型 'System.Web.Mvc.HtmlHelper<dynamic>' ...
...:
Line 27: }
Line 28:
Line 29: @(Html.TelerikReporting().ReportViewer()
Line 30: // Each report viewer must have an id - it will be used by the initialization script
Line 31: // to find the element and initialize the report viewer.
*The Telerik Reporting Q2 2015 Examples have the same problem but it can run report normally :
C:\Program Files\Telerik\Reporting Q2 2015\Examples\CSharp\MvcDemo\Views\Home\Index.cshtml
Visual Studio 2015
ASP.NET MVC 5
.NET Framework 4.6
Best regards
Chris
I'm trying to write a simple Telerik Reporting project but met some diffcults :
New > Project > ... > Telerik C# ASP.NET MVC Application
New > New Item > ... > Telerik MVC Report Viewer Page Q2 2015 (Sample report definition)
Build the project there have no any failed :
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
But the Error List show lots of errors after open ReportViewerView1.cshtml :
Error CS0103 The name 'ViewBag' does not exist in the current context CSharp.MvcDemo C:\Program Files\Telerik\Reporting Q2 2015\Examples\CSharp\MvcDemo\Views\Home\Index.cshtml 6
...
...
Error CS1061 'HtmlHelper' does not contain a definition for 'TelerikReporting' and no extension method 'TelerikReporting' accepting a first argument of type 'HtmlHelper' could be found (are you missing a using directive or an assembly reference?) CSharp.MvcDemo C:\Program Files\Telerik\Reporting Q2 2015\Examples\CSharp\MvcDemo\Views\Home\Index.cshtml 202
And the errors disappears after close ReportViewerView1.cshtml.
Why ? The bug of Visual Studio 2015 ??
Then move the \ReportViewerView1.cshtml into Views/Home, rename to Index.cshtml, the runtime error occurred after Start Debugging :
... CS1061: 'System.Web.Mvc.HtmlHelper<dynamic>' not contains 'TelerikReporting' ...,... 'TelerikReporting' 來接受類型 'System.Web.Mvc.HtmlHelper<dynamic>' ...
...:
Line 27: }
Line 28:
Line 29: @(Html.TelerikReporting().ReportViewer()
Line 30: // Each report viewer must have an id - it will be used by the initialization script
Line 31: // to find the element and initialize the report viewer.
*The Telerik Reporting Q2 2015 Examples have the same problem but it can run report normally :
C:\Program Files\Telerik\Reporting Q2 2015\Examples\CSharp\MvcDemo\Views\Home\Index.cshtml
Visual Studio 2015
ASP.NET MVC 5
.NET Framework 4.6
Best regards
Chris