alanjuden / MvcReportViewer

Custom Report Viewer control to replace MS Report Viewer on MVC projects (also works on .NET Core as a Report Viewer).
MIT License
173 stars 109 forks source link

UseCustomReportImagePath not working #84

Open alicia90 opened 5 years ago

alicia90 commented 5 years ago

I override the property "UseCustomReportImagePath" to true:

protected override bool UseCustomReportImagePath { get { return true; } }

And the property of

protected override string ReportImagePath
        {
            get
            {
                return "/Report/ReportImage/?originalPath={0}";
            }
        }

But the images in my report no found. The URL generated is : http://ReportServer&rs%3ASessionID=zf1gau45cjcc0k45o2kus245&rs%3AFormat=HTML4.0&rs%3AImageID=I_1409_1_H

Becouse?

alicia90 commented 5 years ago

The image is stored in a BBDD as field type image

alanjuden commented 5 years ago

@alicia90, You've overridden the ReportImagePath to the same value that is defined in the ReportController I created...which has really done nothing for you. If you're hoping to use this on a report server that is internally available you really want to override the "UseCustomReportImagePath" property and set the return value to true. Currently, your images are using the path that is coming from the Report Server. If you set UseCustomReportImagePath = true, then the website will begin acting as a proxy to grab the images for you.

Alan

alicia90 commented 5 years ago

Yes, I set UseCustomReportImgePath = true. But the website don't begin acting as a proxy to grab the images.