Page 1 of 1

WebDesigner vs MvcDesigner Issue

Posted: Thu Jun 28, 2012 2:00 am
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

WebDesigner vs MvcDesigner Issue

Posted: Fri Jun 29, 2012 3:38 am
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.

Re: WebDesigner vs MvcDesigner Issue

Posted: Mon Jul 02, 2012 6:49 am
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

Re: WebDesigner vs MvcDesigner Issue

Posted: Wed Jul 04, 2012 2:20 am
by Buknoy Palaboy
Hi,

Any update on this issue.

Regards and Thanks,
Buknoy

Re: WebDesigner vs MvcDesigner Issue

Posted: Wed Jul 04, 2012 7:37 am
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.

Re: WebDesigner vs MvcDesigner Issue

Posted: Wed Jul 04, 2012 8:23 am
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

Re: WebDesigner vs MvcDesigner Issue

Posted: Wed Jul 04, 2012 9:26 am
by Vladimir
Hello, Buknoy

We always glad to help you.

Thank you.