This is a migrated thread and some comments may be shown as answers.

telerik-reporting with angularjs

3 Answers 235 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Que
Top achievements
Rank 1
Que asked on 12 Dec 2015, 07:52 AM

 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.

 

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 12 Dec 2015, 03:08 PM
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
0
Sukumar
Top achievements
Rank 1
answered on 09 Apr 2019, 09:01 AM

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.

0
Todor
Telerik team
answered on 12 Apr 2019, 07:32 AM
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
Tags
General Discussions
Asked by
Que
Top achievements
Rank 1
Answers by
Stef
Telerik team
Sukumar
Top achievements
Rank 1
Todor
Telerik team
Share this question
or