Tuesday, February 21, 2017

Tip: Mixing SSRS Report in a MVC Application

It's very common for us to reuse whatever that's already available in a software project. This is true when we want to reuse a set of reports which are designed and developed using the SSRS report designer and we want to use it in a MVC web site. The problem with this is that MVC does not support the SSRS report viewer directly like a web form web site. There are 2 options to solve this issue: 1. Use an iframe from within the MVC view to load the web form which resides on the same domain. 2. Use an ifram from within the MVC view to load the web form which resides on a different sub-domain. As you can see the only difference between the 2 options is to use a different sub domain to host the web forms. This sounds like non-significant difference but it does make a big difference when comes to report loading performance. The first option for some reasons which i have not found out yet, will most probably unable to load some of my reports. The report viewer constantly use up the CPU for a long time without delivering any result. As for option 2 the report viewer does use a lot of CPU too, but it is able to load reports that are not "loadable" in option 1.