HTML5 Report Viewer with TypeReportSource is blank

9 posts, 0 answers
  1. Craig Aussie
    Craig Aussie avatar
    17 posts
    Member since:
    Mar 2006

    Posted 17 Oct Link to this post

    I am trying to use the HTML5 viewer with the following MVC code. 

    @(Html.TelerikReporting().ReportViewer()

               .Id("reportViewer1")
               .ServiceUrl("/api/reports")
               .TemplateUrl("/TelerikReports/Html5/ReportViewer/templates/telerikReportViewerTemplate-9.1.15.731.html")
               .ReportSource(new TypeReportSource() { TypeName = "MyApp.TelerikReports.MonthlySales, MyApp.Reports" })            
               .ViewMode(ViewMode.Interactive)
               .ScaleMode(ScaleMode.Specific)
               .Scale(1.0)
               .PersistSession(false)
               .Deferred()
        )

     

    I don't get any errors but the viewer renders as totally blank, no HTML is generated. What is most likely reason for this?

     

  2. Craig Aussie
    Craig Aussie avatar
    17 posts
    Member since:
    Mar 2006

    Posted 19 Oct in reply to Craig Aussie Link to this post

    I found a StackOverflow question with exactly the same problem, but no answer.

    http://stackoverflow.com/questions/34132095/telerik-reporting-with-asp-net-mvc-report-viewer-is-not-correctly-rendered

     

  3. DevCraft banner
  4. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 19 Oct Link to this post

    Hi Craig,

    Most probably there is a hidden error. Thus my suggestion is to check the requests with tool like Fiddler.

    Give it a try and if you need additional assistance please send us the Fiddler log.

    Regards,
    Peter
    Telerik by Progress
    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
  5. Craig Aussie
    Craig Aussie avatar
    17 posts
    Member since:
    Mar 2006

    Posted 19 Oct in reply to Peter Link to this post

    I did try that and didn't see any errors. In fact it didn't even make any server requests at all.
  6. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 19 Oct Link to this post

    Hi Craig,

    How did you add the viewer? Did you use the dedicated item template as elaborated in  How To: Use HTML5 ASP.NET MVC Report Viewer in an application help article?

    Check out the Manual Setup help article to make sure that your project and viewer page are correctly configured.

    The demos that came with the Telerik Reporting installation have a running MVC demo, consider examining it.
     
    Regards,
    Peter
    Telerik by Progress
    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
  7. Craig Aussie
    Craig Aussie avatar
    17 posts
    Member since:
    Mar 2006

    Posted 19 Oct in reply to Craig Aussie Link to this post

    I have just started using the Javascript version directly and it seems to work now. Only problem now is the styling is broken on the preview, see attachment. 
  8. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 19 Oct Link to this post

    Hi Craig,

    This looks like a missing CSS. Which version of Telerik Reporting you utilize? Currently all the CSS dependencies are served as resources by the REST service. Thus consider checking the requests with Fiddler.

    Regards,
    Peter
    Telerik by Progress
    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
  9. Craig Aussie
    Craig Aussie avatar
    17 posts
    Member since:
    Mar 2006

    Posted 19 Oct in reply to Peter Link to this post

    Looking in Fiddler no CSS resources are served. What should I be looking for and what could cause them not to be served?
  10. Craig Aussie
    Craig Aussie avatar
    17 posts
    Member since:
    Mar 2006

    Posted 19 Oct in reply to Craig Aussie Link to this post

    I manually included all the resources and font awesome and it seems to work now.

     

Back to Top
DevCraft banner