I'm trying to create a simple report with telerik reporting and ASP.NET MVC 4. I have several questions
I have created a sample report by binding to a sql datasource.
my report name is "Report2.cs" but i'm confused about .trdx report (why should i create a .trdx report)?
when trying to bind the report to report viewer i use the below code.
@{
ViewBag.Title = "reportview";
Layout = "~/Views/Shared/_mainView.cshtml";
}
@section styles
{
<link href="~/Content/ReportViewer/styles/ReportViewer-7.2.13.1016.css" rel="stylesheet" />
<style>
#reportViewer1
{
position: absolute;
left: 5px;
right: 5px;
top: 5px;
bottom: 5px;
overflow: hidden;
}
</style>
}
@section scripts
{
<link href="~/Content/kendo/2013.2.716/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo/2013.2.716/kendo.blueopal.min.css" rel="stylesheet" />
<script src="~/Scripts/kendo/2013.2.716/kendo.all.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<script src="~/Content/ReportViewer/js/ReportViewer-7.2.13.1016.js"></script>
}
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.TemplateUrl("/Content/ReportViewer/templates/telerikReportViewerTemplate.html")
.ReportSource(new Telerik.Reporting.TypeReportSource() { TypeName = "MvcReportApplication.MyReport.Report2" })
.ViewMode(Telerik.ReportViewer.Mvc.ViewModes.INTERACTIVE)
.ScaleMode(Telerik.ReportViewer.Mvc.ScaleModes.SPECIFIC)
.Scale(1.0)
.PersistSession(true)
)
report is not displayed and i get the below error in console
Uncaught TypeError: Cannot call method 'replace' of undefined
I have created a sample report by binding to a sql datasource.
my report name is "Report2.cs" but i'm confused about .trdx report (why should i create a .trdx report)?
when trying to bind the report to report viewer i use the below code.
@{
ViewBag.Title = "reportview";
Layout = "~/Views/Shared/_mainView.cshtml";
}
@section styles
{
<link href="~/Content/ReportViewer/styles/ReportViewer-7.2.13.1016.css" rel="stylesheet" />
<style>
#reportViewer1
{
position: absolute;
left: 5px;
right: 5px;
top: 5px;
bottom: 5px;
overflow: hidden;
}
</style>
}
@section scripts
{
<link href="~/Content/kendo/2013.2.716/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo/2013.2.716/kendo.blueopal.min.css" rel="stylesheet" />
<script src="~/Scripts/kendo/2013.2.716/kendo.all.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<script src="~/Content/ReportViewer/js/ReportViewer-7.2.13.1016.js"></script>
}
@(Html.TelerikReporting().ReportViewer()
.Id("reportViewer1")
.TemplateUrl("/Content/ReportViewer/templates/telerikReportViewerTemplate.html")
.ReportSource(new Telerik.Reporting.TypeReportSource() { TypeName = "MvcReportApplication.MyReport.Report2" })
.ViewMode(Telerik.ReportViewer.Mvc.ViewModes.INTERACTIVE)
.ScaleMode(Telerik.ReportViewer.Mvc.ScaleModes.SPECIFIC)
.Scale(1.0)
.PersistSession(true)
)
report is not displayed and i get the below error in console
Uncaught TypeError: Cannot call method 'replace' of undefined