External Report Source

2 posts, 0 answers
  1. Jan
    Jan avatar
    8 posts
    Member since:
    Sep 2014

    Posted 15 Oct 2014 Link to this post

    I've implemented the report viewer in my MVC application and everything works well. I'm wondering if it's possible to store our Telerik reports outside of the web application, on a shared drive for example, so that we can keep the report files created in Report Designer separate from the web application. Is there any way to point that Uri to a mapped network drive maybe?

    This is the current code, but I would like to be able to have @Model.ReportSource be a path to an external path.

    @(Html.TelerikReporting().ReportViewer()
           .Id("reportViewer1")
           .ServiceUrl("/api/reports/")
           .TemplateUrl("/Content/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html")
           .ReportSource(new UriReportSource() { Uri = @Model.ReportSource })
           .ViewMode(ViewModes.INTERACTIVE)
           .ScaleMode(ScaleModes.SPECIFIC)
           .Scale(1.0)
           .PersistSession(false)
    )
  2. Jan
    Jan avatar
    8 posts
    Member since:
    Sep 2014

    Posted 15 Oct 2014 in reply to Jan Link to this post

    .ReportSource(new UriReportSource() { Uri = "//networkpath/" + @Model.ReportSource })

    worked fine.
Back to Top