StiMvcViewer bug

Stimulsoft Reports.WEB discussion
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

StiMvcViewer bug

Post by brianj774 »

On my receipt page, I have the following code:

Code: Select all

@Html.Stimulsoft().RenderMvcViewerScripts()
	
@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions() {
  ActionGetReportSnapshot = "GetReportSnapshot",
  ActionExportReport = "ExportReport",
  Width = Unit.Percentage(100),
  Height = Unit.Pixel(999)
})
The page renders, but a breakpoint set on the "GetReportSnapshot" function on the controller never fires. I opened firebug, and I see a bunch of javascript errors.

Code: Select all

TypeError: css.style is undefined
...SX8JXDlgb15R2g1&t=634953124420000000" style="height:16px;width:16px;padding:...

Receip...r6tRTc= (line 84)

TypeError: jsMvcViewer is undefined
...SX8JXDlgb15R2g1&t=634953124420000000" style="height:16px;width:16px;padding:...

Receip...r6tRTc= (line 84)
I actually see multiple dozens of the second error, 100 or more, maybe.

For a point of reference, the report works fine if I shift it to use the StiMvcViewerFx control instead... (literally just adding "Fx" in 3 places)

There appears to be a bug of some sort in the StiMvcViewer..

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StiMvcViewer bug

Post by Alex K. »

Hello,

The issue is fixed.
The solution will be available in the next prerelease build on this week.

Thank you.
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: StiMvcViewer bug

Post by brianj774 »

I've updated to the 1508 pre-release, and I'm getting a different error now. It looks to be thrown by jquery-1.8.2

SecurityError: The operation is insecure.
len = arr.length;

(again, it still works fine if I use the ViewerFX controls instead)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StiMvcViewer bug

Post by Alex K. »

Hello,

Need some time for check the issue.

Thank you.
ivafortius
Posts: 3
Joined: Thu Feb 21, 2013 2:52 pm

Re: StiMvcViewer bug

Post by ivafortius »

Hello,
I have the same error with StiMvcViewer:

TypeError: css.style is undefined
...SX8JXDlgb15R2g1&t=634953124420000000" style="height:16px;width:16px;padding:...
Receip...r6tRTc= (line 84)
TypeError: jsMvcViewer is undefined
...SX8JXDlgb15R2g1&t=634953124420000000" style="height:16px;width:16px;padding:...
Receip...r6tRTc= (line 84)



so until problem solves i am using StiMvcViewerFx.

But now have another problem with connection when change in code.
When change database nothing show in report and i checked Connection string data ant they are correct.

Code: Select all

    public ActionResult GetReportSnapshot()
        {
            string report_directorij = Server.MapPath("~/Content/Reporti");
            StiReport rep = new StiReport();
            string Constring = ConfigurationManager.ConnectionStrings["TraceDanceLogOn"].ConnectionString;
            RouteValueDictionary routeValues = StiMvcViewerFx.GetRouteValues(this.Request);
            int id = 1;
            if (routeValues["id"] != null) id = Convert.ToInt32(routeValues["id"]);


            switch (id)
            {
                
                case 1:

                    rep.Load(report_directorij + "\\TD4_User_Country.mrt");

                    if (!String.IsNullOrEmpty(Constring))
                    {
                        rep.Dictionary.Databases.Clear();
                        rep.Dictionary.Databases.Add(new StiSqlDatabase("TraceDance", Constring));

                    }
                    rep.Compile();
        
                    break;

              
                case 2:
                
                    rep.Load(report_directorij + "\\TD4_User_DanceFloor.mrt");
                    if (!String.IsNullOrEmpty(Constring))
                    {
                        rep.Dictionary.Databases.Clear();
                        rep.Dictionary.Databases.Add(new StiSqlDatabase("TraceDance", Constring));

                    }
                    rep.Compile();
                    break;
            }

           
              return StiMvcViewerFx.GetReportSnapshotResult(this.Request, rep);
 
        }
In my other ASP.NET project i used StiWebViewer and change database like this worked fine work fine.

Regards.
Thank you
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcViewer bug

Post by HighAley »

Hello.

The first problem is already solved.
To give you an answer on the second question we need to see your working project.

Thank you.
ivafortius
Posts: 3
Joined: Thu Feb 21, 2013 2:52 pm

Re: StiMvcViewer bug

Post by ivafortius »

How can I send you my project with report and database?
It has about 60 MB.
I download Stimulsoft Reports.Ultimate 2013.02.22 but I still has first problem.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcViewer bug

Post by HighAley »

Hello.

You can use any file sharing service.

Thank you.
ivafortius
Posts: 3
Joined: Thu Feb 21, 2013 2:52 pm

Re: StiMvcViewer bug

Post by ivafortius »

I send my project over WE-transfer
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMvcViewer bug

Post by HighAley »

Hello.

Where did you send it?

Thank you.
Post Reply