/api/reports/clients returns “Missing report name”" />

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

5 posts, 0 answers
  1. N M Reddy
    N M Reddy avatar
    8 posts
    Member since:
    Sep 2012

    Posted 12 Dec 2013 Link to this post

    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
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 14 Dec 2013 Link to this post

    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.

  3. N M Reddy
    N M Reddy avatar
    8 posts
    Member since:
    Sep 2012

    Posted 16 Dec 2013 Link to this post

    thank you
  4. Siva
    Siva avatar
    1 posts
    Member since:
    Jan 2014

    Posted 10 Feb 2015 Link to this post

    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. 
  5. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 11 Feb 2015 Link to this post

    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.

     
Back to Top