Reports.Web with a simple MVC app

Stimulsoft Reports.WEB discussion
Post Reply
jjose
Posts: 1
Joined: Tue Oct 11, 2011 2:32 am

Reports.Web with a simple MVC app

Post 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
Attachments
1357.ASPXProject.rar
(448.25 KiB) Downloaded 170 times
Toodle.Noodle
Posts: 1
Joined: Wed Oct 12, 2011 2:06 am

Reports.Web with a simple MVC app

Post 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.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Reports.Web with a simple MVC app

Post 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.
smam
Posts: 1
Joined: Thu Dec 22, 2011 8:42 am

Reports.Web with a simple MVC app

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Reports.Web with a simple MVC app

Post 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.
Post Reply