telerik-reporting with angularjs

4 posts, 0 answers
  1. Que
    Que avatar
    8 posts
    Member since:
    Dec 2015

    Posted 12 Dec 2015 Link to this post

     I want telerik-reporting call angularjs

     I've added the following libraries:Telerik.Reporting.dll,Telerik.Reporting.Services.WebApi.dll,Telerik.Reporting.XpsRendering.dll,Telerik.ReportViewer.Mvc.dll

     file js:

     $('#ReportViewer1').telerik_ReportViewer(
                 {
                     error: function (data) {
                         alert(data);
                     },
                     reportSource: {
                         report: '/Reports/Dashboard.trdx'
                     },
                     serviceUrl: '/api/reports/',
                     templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate.html',
                     ready: function () {
                         this.refreshReport();
                     }
                 });

     

    ReportsController:

     protected override IReportResolver CreateReportResolver()
            {
                var reportsPath = HttpContext.Current.Server.MapPath("~/Reports");

                return new ReportFileResolver(reportsPath)
                    .AddFallbackResolver(new ReportTypeResolver());
            }

            protected override ICache CreateCache()
            {
                return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
            }

     

    Global.cs:

     

     public static void RegisterGlobalFilters(GlobalFilterCollection filters)
            {
                filters.Add(new HandleErrorAttribute());
            }

            public static void RegisterRoutes(RouteCollection routes)
            {
                routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
                routes.MapHttpRoute(
                    name: "DefaultApi",
                    routeTemplate: "api/{controller}/{id}",
                    defaults: new { id = RouteParameter.Optional }
                );
            }

            protected override void Application_Start(object sender, EventArgs e)
            {
                IocManager.Instance.IocContainer.AddFacility<LoggingFacility>(f => f.UseLog4Net().WithConfig("log4net.config"));
                ReportsControllerConfiguration.RegisterRoutes(GlobalConfiguration.Configuration);

                base.Application_Start(sender, e);
            }

     

     

    but its not working

    who can help me

    thanks a lots.

     

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 12 Dec 2015 Link to this post

    Hello Que,

    You will need to update the ReportsControllerBase implementation with the one illustrated in How To: Implement the ReportsController in an application. Then go trough the steps of the How To: Add Telerik Reporting REST Web API to Web Application article and verify the Reporting REST service is added correctly and responds to requests for formats.

    For the client, add an HTML page with the settings from the HTML5 Viewer Manual Setup article, and configure your controller to open the page.


    To ease the process you can create a web application and use the HTML5 Viewer VS item template, and then just copy the HTML page produced by the wizard.


    If you need further help, please open a support ticket and send us a demo project illustrating your settings, including details about the problem on running the application.

    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Sukumar
    Sukumar avatar
    2 posts
    Member since:
    Feb 2019

    Posted 09 Apr Link to this post

    Hi,

    I am using telerik report viewer in angularJS, I need to change the CSV rendering options for the export to CSV feature in the web. I cannot change the telerik reporting xml configuration as the reporting.dll is referenced from nuget package. Can you help with a way to fix this out.

    Best regards,

    Sukumar.

  4. Todor
    Admin
    Todor avatar
    267 posts

    Posted 12 Apr Link to this post

    Hi Sukumar,

    You should use the configuration file (Web.config) of the application, where the Telerik Reporting REST Service is running to set the CSV rendering options, like explained in the extensions Element article, taking into account the particular CSV extension options listed in the CSV Device Information Settings article. Note that the reports get processed and rendered on the service and the viewer just requests them using the REST API. Therefore, the settings regarding any specific rendering format should be done on the service.

    Regards,
    Todor
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top