
I'm working in a MVC report and I have difficult in find a sample of MVC Globalization of a report.
I'm read the documentation and saw the sample in webform globalization, but dont have sucess in globalize a MVC application.
I try globalize the designer and the view with AspGlobalResource. This sample that I have maid.
Code: Select all
public virtual ActionResult GetReportSnapshot()
{
StiReport report = new StiReport();
report.AutoLocalizeReportOnRun = true;
report.GlobalizationManager = new GlobalizationManager("Namespace.Resources.Relatorio", System.Threading.Thread.CurrentThread.CurrentCulture);
report.Load(this.PathRelatorio);
report.RegBusinessObject(this.NomeModelDTO, this.DadosRelatorio);
report.Dictionary.SynchronizeBusinessObjects(3);
report.Compile();
return StiMvcMobileViewer.GetReportSnapshotResult(this.HttpContext, report);
}
Code: Select all
@Html.Stimulsoft().StiMvcDesigner(
new StiMvcDesignerOptions
{
ActionGetReportTemplate = "GetReportTemplateDesigner",
ActionSaveReportTemplate = "SaveReportTemplateDesigner",
ActionGetReportSnapshot = "GetReportSnapshotDesigner",
Width = System.Web.UI.WebControls.Unit.Percentage(100),
Height = System.Web.UI.WebControls.Unit.Pixel(800),
PrintAllowToPdf = false,
PrintAllowToHtml = false,
AllowModifyConnections = false,
AllowModifyDictionary = false,
ShowSaveFileDialog = false,
ViewerShowButtonSave = false,
MainMenuShowNew = false,
MainMenuShowNewReport = false,
MainMenuShowExitButton = false,
MainMenuShowOpenReport = false,
MainMenuShowOpenReportFromGoogleDocs = false,
MainMenuShowSaveAs = false,
LocalizationDirectory = Url.Content("~/Areas/Relatorios/Content/Localization"),
Localization = System.Threading.Thread.CurrentThread.CurrentCulture.Name,
ActionGetLocalization = "GetLocalization",
})
Code: Select all
@Html.Stimulsoft().StiMvcMobileViewer("MvcViewerRelatorio",
new StiMvcMobileViewerOptions()
{
ActionGetReportSnapshot = "GetReportSnapshot",
ActionViewerEvent = "ViewerEvent",
ServerTimeout = new TimeSpan(900000000000),
ActionPrintReport = "PrintReport",
ActionExportReport = "ExportReport",
Localization = System.Threading.Thread.CurrentThread.CurrentCulture.Name,
//ActionGetLocalization = "GetLocalization",
})

Att,
Ivan Patrick Fontanive.