WebDesigner vs MvcDesigner Issue

Stimulsoft Reports.WEB discussion
Post Reply
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

WebDesigner vs MvcDesigner Issue

Post by Buknoy Palaboy »

Hi Stimulsoft Team,

I would like to ask if this is a bug or is there something that I have to do to make it work.
I'm using SqlConnection as my connection type. It consist of 1 datasource using 1 table.
I used 2 columns for display, actually it is just a simple list of codes and descriptions.
No filter, no sorting, no grouping, just a plain list. I used the sample projects from the
package of stimulsoft ultimate. If I used the WebDesigner sample and open my test.mrt file
as describe above then preview the report, I was able to see all the records from my database.
Now when I used the MvcDesigner sample project and open my test.mrt file, upon preview, the
report is blank. I'm using the same mrt file for both sample projects and failed on MvcDesigner.
Any thoughts why this happens? Am I missing an extra step when dealing with MvcDesigner?
What is the difference between WebDesigner and MvcDesigner besides from WebDesigner being
used for web forms and MvcDesigner being used for MVC view?

Regards and Thanks,
Buknoy
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

WebDesigner vs MvcDesigner Issue

Post by Vladimir »

Hello,

Most likely, you do not specify the GetReportSnapshot action, which is necessary for a preview. About this in detail you can read in our documentation:

14.4 Previewing Reports (Page 984)

http://stimulsoft.com/Documentation/Sti ... En.Pdf.zip

Thank you.
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Re: WebDesigner vs MvcDesigner Issue

Post by Buknoy Palaboy »

Hi Vladimir,

How come I don't have to modify anything from stimulsoft sample program using WebDesigner?
The very step by step procedure that I did with the WebDesigner I do it with the MvcDesigner using IE 9.
I don't change any code from the sample application of stimulsoft. Database connections and requirements
are all included in the MRT file. All I have to do is load/open the mrt file and preview. Result at my end,
WebDesigner retrieves all data, MvcDesigner blank page.

Regards and Thanks,
Buknoy
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Re: WebDesigner vs MvcDesigner Issue

Post by Buknoy Palaboy »

Hi,

Any update on this issue.

Regards and Thanks,
Buknoy
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: WebDesigner vs MvcDesigner Issue

Post by Vladimir »

Hello,

Code: Select all

        public ActionResult GetReportSnapshot()
        {
            // Get the report template
            StiReport report = StiMvcDesignerHelper.GetReportObject(this.Request);

// --- Please comment these lines in our sample
            // Register data, if necessary
            // DataSet data = new DataSet("Demo");
            // data.ReadXml(Server.MapPath("~/Content/Data/Demo.xml"));
            // report.Dictionary.Databases.Clear();
            // report.RegData(data);
// ---

            // Return the report snapshot result to the client
            return StiMvcDesignerHelper.GetReportSnapshotResult(report, this.Request);
        }
Thank you.
User avatar
Buknoy Palaboy
Posts: 48
Joined: Fri Jun 22, 2012 1:34 am
Location: Philippines

Re: WebDesigner vs MvcDesigner Issue

Post by Buknoy Palaboy »

Hi Vladimir,

Changing the code works, thanks!

Based on observation, MvcDesigner is more stricter than WebDesigner since I don't have to comment or change the code in the
sample application for WebDesigner. As seen below, no change and still the report will still be previewed in the WebDesigner browser.

Code: Select all

protected void StiWebDesigner1_GetPreviewDataSet(object sender, StiWebDesigner.StiPreviewDataSetEventArgs e)
    {
        string applicationDirectory = HttpContext.Current.Server.MapPath(string.Empty);

        DataSet data = new DataSet();
        data.ReadXml(applicationDirectory + "\\Data\\Demo.xml");
        data.ReadXmlSchema(applicationDirectory + "\\Data\\Demo.xsd");

        e.PreviewDataSet = data;
    }
Cheers to you, you've been a great help! :D

Regards and Thanks,
Buknoy
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: WebDesigner vs MvcDesigner Issue

Post by Vladimir »

Hello, Buknoy

We always glad to help you.

Thank you.
Post Reply