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

External Report Source

1 Answer 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 15 Oct 2014, 04:48 PM
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)
)

1 Answer, 1 is accepted

Sort by
0
Jan
Top achievements
Rank 1
answered on 15 Oct 2014, 08:59 PM
.ReportSource(new UriReportSource() { Uri = "//networkpath/" + @Model.ReportSource })

worked fine.
Tags
General Discussions
Asked by
Jan
Top achievements
Rank 1
Answers by
Jan
Top achievements
Rank 1
Share this question
or