Page 1 of 1

GlobalizationManager not working in MvcMobileDesigner?

Posted: Wed Mar 15, 2017 2:06 pm
by rodrigo.avots
I add GlobalizationManager in GetReportTemplate and GetReportSnapshotD but not works!

//GetReportSnapshotD
public ActionResult GetReportTemplate(string id)
{
StiReport report = new StiReport();
try
{
report.Load(Server.MapPath("~/Content/Reports/" + id + ".mrt"));
GetResults(report);
//Globalization -- not work
report.GlobalizationManager = new GlobalizationManager(GetCulture());

StiMvcMobileDesignerOptions opt = new StiMvcMobileDesignerOptions();
opt.Theme = Stimulsoft.Report.MvcMobile.StiTheme.Office2013DarkGrayBlue;
//opt.Localization = GetLocalizationDesigner();

return StiMvcMobileDesigner.GetReportTemplateResult(HttpContext, report);
}
catch (Exception e)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Custom Error Message: " + e.Message);
}

}

public ActionResult GetReportSnapshotD(string id)
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);

//Globalization -- not work
report.GlobalizationManager = new GlobalizationManager(GetCulture());


return StiMvcMobileDesigner.GetReportSnapshotResult(HttpContext, report);
}


Another question, could you give me an example of how to apply StiMvcMobileDesignerOptions[in blue].

Thanks.

Re: GlobalizationManager not working in MvcMobileDesigner?

Posted: Fri Mar 17, 2017 6:20 am
by HighAley
Hello.

Please, check next sample of the Globalization.
Does it work on your side?

You should set the StiMvcMobileDesignerOptions on the View. Please, look at the sample here:

Thank you.

Re: GlobalizationManager not working in MvcMobileDesigner?

Posted: Fri Mar 17, 2017 12:11 pm
by rodrigo.avots
I did as the example. Did not work
In viewer work fine, but designer not work!

// --- MvcMobileViewer Actions --- ok fine //
public ActionResult GetReportSnapshot(string id)

{
StiReport report = new StiReport();

//Globalization
report.GlobalizationManager = new GlobalizationManager(GetCulture());


report.Load(Server.MapPath("~/Content/Reports/" + id + ".mrt"));
GetResults(report);

return StiMvcViewer.GetReportSnapshotResult(report);
}
public CultureInfo GetCulture()
{
CultureInfo cultureName = new CultureInfo(Thread.CurrentThread.CurrentCulture.ToString());
return cultureName;
}

But...

// --- MvcMobileViewer Actions --- problem //
public ActionResult GetReportSnapshotD(string id)
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);

//Globalization -- not work
report.GlobalizationManager = new GlobalizationManager(GetCulture());


return StiMvcMobileDesigner.GetReportSnapshotResult(HttpContext, report);
}

Thanks.

Re: GlobalizationManager not working in MvcMobileDesigner?

Posted: Mon Mar 20, 2017 11:14 am
by HighAley
Hello.

We have fond a bug in our code that caused the GlobalizationManager does not work.
We have made an improvement. Please, check our next build when it will be available.

Thank you.