Page 1 of 1

Reports.Web with a simple MVC app

Posted: Tue Oct 11, 2011 2:41 am
by jjose
Hi there,

I have heard a lot of times that Stimulsoft does not support MVC, would like to know if it is 100% true.
Or when you say you dont support MVC is it just the way of fetching the data and binding it to a control in a view?

Nevertheless I was trying a simple MVC application with a StiWebViewer control in it and the following is just the basic the load event has:

Code: Select all

protected void StiWebViewer1_Load(object sender, EventArgs e)
    {
        Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
        StiWebViewer1.Report = report;        
    }
Strangely enough I get the DirectoryNotFound exception on the second line:
"Could not find a part of the path 'D:\Test\ASPXProject\ASPXProject\Home'"

I suppose if this should/shouldn't be due to the fact that Sti does not support the MVC pattern.
Or simply because it looks for some kind of temp folder at runtime to place some temp files.
I just hope there is a simple workaround to this.
I have attached the sample app I used herewith.

Thanks

Reports.Web with a simple MVC app

Posted: Wed Oct 12, 2011 2:16 am
by Toodle.Noodle
Hi,

To your code. I think that you need to specify path to your report using Load method before sending it to WebViewer.

Code: Select all

protected void StiWebViewer1_Load(object sender, EventArgs e)
    {
        Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
        report.Load("location of report goes here"); //<-- try to add this line
        StiWebViewer1.Report = report;        
    }
I have a little different problem. I have StiWebViewer in a View page but I'm not able to access it from ActionResult in Controller which returns the View. Could you help me on this one?

Thanks.

EDIT:

Ok, I've tried it and didn't work. I've tried to implement your solution to my project and I get the same error. I will continue testing and hopefully solve it.

EDIT 2:

Found this article about how to work with SSRS reports. I was thinking about this approach but I was trying to avoid it. It seems to be only way how to work with WebViewers (either SSRS or STI) in MVC project. Basically you have to create non-MVC site inside MVC project and in its code-behind work with Viewer.

Hope this helps.

Reports.Web with a simple MVC app

Posted: Wed Oct 12, 2011 7:58 am
by Vladimir
Hello,

At this moment we have priority plans to add support of MVC for our reporting tool, we plan to complete this work for release 2011.3 in December.

Thank you.

Reports.Web with a simple MVC app

Posted: Thu Dec 22, 2011 8:47 am
by smam
The release is gone and it hasn't the support of MVC :(
Vladimir wrote:Hello,

At this moment we have priority plans to add support of MVC for our reporting tool, we plan to complete this work for release 2011.3 in December.

Thank you.

Reports.Web with a simple MVC app

Posted: Fri Dec 23, 2011 5:05 am
by HighAley
Hello.
smam wrote:The release is gone and it hasn't the support of MVC :(
This was harder then we thought. We are still working on it.
Beta version of MVC support must be available in January.

Thank you.