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

ASP.net MVC - Telerik Reporting error => /api/reports/clients returns “Missing report name”

4 Answers 603 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
N M Reddy
Top achievements
Rank 1
N M Reddy asked on 13 Dec 2013, 02:16 AM

I am new to Telerik Reporting & have started adding Report Viewer to my ASP.net MVC application. In runtime ReportViewer is displaying "Bad Request" & Fiddler is displaying below error message.

Message: POST /api/reports/clients/215829-979c/parameters HTTP/1.1 "Missing report name"

Can you please help me in this.

Report viewer code snippet:

Html.TelerikReporting().ReportViewer()
                   .Id("reportViewer1")
                   .ServiceUrl("/api/reports")
                   .TemplateUrl("/ReportViewer/templates/telerikReportViewerTemplate.html")
                   .ReportSource(Model.ReportSource)
                   .ViewMode(ViewModes.INTERACTIVE)
                   .ScaleMode(ScaleModes.SPECIFIC)
                   .Scale(1.0) 

Report Source in ViewModel
            var settings = new System.Xml.XmlReaderSettings();<br>            settings.IgnoreWhitespace = true;<br><br>            using (System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(System.Web.HttpContext.Current.Server.MapPath("~/Reports/Dashboard.trdx"), settings))<br>            {<br>                var xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();<br><br>                var report = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);<br>                report.DataSource = this.SearchResult == null ? new List<EnquiryPoster>() : this.SearchResult;                <br><br>                this.ReportSource = new InstanceReportSource<br>                {                    <br>                    ReportDocument = report,<br>                };<br>            }


thank you
-nm

4 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 Dec 2013, 05:20 PM
Hi Nm,

Based on the code snippets you pass InstanceReportSource to the viewer which we do not recommend. Please use TypeReportSource and bind the report using ObjectDataSource. For example take a look at the attached sample project.

I hope this information helps you.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
N M Reddy
Top achievements
Rank 1
answered on 17 Dec 2013, 03:20 AM
thank you
0
Siva
Top achievements
Rank 1
answered on 10 Feb 2015, 08:00 AM
We are using Kendo-Telerik Controls for our projects. Basically we are using ASP.NET MVC application and we consume the WCF services for our data access. When we try to use Telerik reports, we presumed like need to in corporate WepApi. Please advice us how to proceed further. 
0
Stef
Telerik team
answered on 11 Feb 2015, 02:28 PM
Hello Siva,

Please check the following forum thread elaborating on the HTML5 Report Viewer and Reporting REST service architecture, and the possible approach to supply data via data service or in custom resolver for the service: Using ObjectDataSource With Non-Static Methods?

On a side note for anyone concerned, you can use InstanceReportSource to display a report in the HTML5 Report Viewer. For the purpose you will need a custom report resolver where to instantiate the report on the server and wrap it in an InstanceReportSource.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
N M Reddy
Top achievements
Rank 1
Answers by
Stef
Telerik team
N M Reddy
Top achievements
Rank 1
Siva
Top achievements
Rank 1
Share this question
or