Telerik Forums
Reporting Forum
1 answer
72 views

Hello, 

 

I am trying to see what option is the best for making report book in run time in my angular application.

In the article posted by you : https://docs.telerik.com/reporting/knowledge-base/how-to-display-reportbook-in-viewer , the third solution is not recommended  but that solution explains what I need, and that is that users can check reports which they want to merge in a report book, and do it by themselves and not by me in design time. So my question is why this solution is not recommended? Is there any bugs, any problems or this is just not working properly ? 

 

Thanks in advance!

Tamara

Dimitar
Telerik team
 answered on 10 Mar 2023
1 answer
1.5K+ views

I found some bits of code from long ago but still can't figure it out.

Any up to date clear code You could give me ?  I am using Angular/.NET core 5.0.

I am putting the report in the wwwroot and setting to copy always so the report seems to be there. The report has no parameters.

 

I get the error below


   [HttpGet]
        //https://localhost:44374/reports/testreport
        public string TestReport()
        {
            string webRootPath = _webHostEnvironment.WebRootPath;

            var rptName = Path.Combine(webRootPath, "Reports\\AllForms.trdp");
            var report = new Telerik.Reporting.Report { DocumentName = rptName };
            var instanceReportSource = new InstanceReportSource { ReportDocument = report };

            var reportProcessor = new ReportProcessor();
            var result = reportProcessor.RenderReport("PDF", instanceReportSource, new Hashtable());

            return "xxx";
        }

 

The current data set presented in the report did not produce any significant content, so no pages were generated. If you need to see the whole report content, including blank pages, please contact the report author.

Dimitar
Telerik team
 answered on 18 Nov 2021
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?