custom datasource ASP.NET MVC

1 posts, 0 answers
  1. Luis Ismael
    Luis Ismael avatar
    14 posts
    Member since:
    Nov 2014

    Posted 19 Feb 2018 Link to this post

    Hello, someone has some idea how to customize reporting

    I do the following

     @(Html.TelerikReporting().ReportViewer()
                .Id("reportViewer1")
                .ServiceUrl(Url.Content("~/api/reports"))
                .TemplateUrl(Url.Content("~/Content/ReportViewer/templates/telerikReportViewerTemplate.html"))
                .ReportSource(Model.TheReport)
                .ViewMode(ViewMode.Interactive)
                .ScaleMode(ScaleMode.Specific)
                .Scale(1.0)
                .PersistSession(false)
                .PrintMode(PrintMode.AutoSelect)
                .EnableAccessibility(false)
                .Deferred()
        )

    public class ReportController : Controller
        {
            // GET: Report
            public ActionResult Index()
            {
                Uri uri = HttpContext.Request.Url;
                var changeReport = new ReportController().Identification(1, uri);
                return View(new ReportModel() { TheReport = changeReport});
            }
                 // Controls

        
                var txtName = ((Telerik.Reporting.TextBox)report.Items.Find("txtName ", true)[0]);
                txtName.Value = !string.IsNullOrEmpty(name) ? name.Trim() : empty;

Back to Top