Я использую VS2013 ASP.NET MVC 5 с Стимулсофт 2013,5Stimulsoft marginsPx [i] .replace не является функцией ошибки JavaScript в MVC5?
Это нормально, Но следующий Javascript исключение на Вид:
marginsPx[i].replace is not a function
Мой Вид:
<div class="@Model.ReportParametersVisibilityCssClass">
@using (Html.BeginForm("Kardex", "KaraReports", FormMethod.Post, new Dictionary<string, object> { { "id", "ReportForm" }, { "class", "form-horizontal" }, { "role", "form" } }))
{
@Html.AntiForgeryToken()
@Html.HiddenFor(model => model.SelectedEmployeesEmpNoInJsonFormat)
@Html.HiddenFor(model => model.SelectedEmployeesFiltering)
@Html.HiddenFor(model => model.StartDate)
@Html.HiddenFor(model => model.EndDate)
@Html.HiddenFor(model => model.Month)
<div class="maxwidth500 center-block">
<div class="form-group">
@Html.Action("MonthSelector", "CommonActions", new { month = Model.Month, startDate = Model.StartDate, endDate = Model.EndDate })
</div>
<hr />
<div class="form-group">
<div class="col-sm-3"></div>
<div class="col-sm-6">
<button type="button" class="btn btn-default" data-name="select-personnels" data-toggle="modal" data-target="#SelectableSearchEmployeeModal">@Resources.SelectPersonals</button>
<span data-name="selected-employees-numbers"></span>
</div>
</div>
<div class="form-group">
@Html.BootstrapCheckBoxFor(model => model.ShowReportSectionBySection)
@Html.BootstrapCheckBoxFor(model => model.ShowEachGroupInSeperatedPage)
</div>
<hr />
<div class="form-group">
@Html.BootstrapSubmitButton(false, new Dictionary<string, object> { { "name", "command" }, { "value", Resources.Observation } }, Resources.Observation)
@Html.BootstrapSubmitButton(false, new Dictionary<string, object> { { "name", "command" }, { "value", Resources.Print }, { "class", "btn btn-default" } }, string.Format("<span title=\"{0}\" class=\"glyphicon glyphicon-print\"></span>", Resources.Print))
@Html.BootstrapCancelButton()
</div>
</div>
}
</div>
<div class="@Model.ReportViewerVisibilityCssClass" style="direction: ltr;">
<hr />
@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions
{
Actions =
{
GetReportSnapshot = "KardexStimulsoftReport",
ViewerEvent = "KardexViewerEvent"
},
Toolbar =
{
//Visible = false,
ShowParametersButton = false
}
})
</div>
Мои действия:
[AuthorizeUser(Permissions = "131213")]
public ActionResult KardexStimulsoftReport()
{
KardexReportModel model = TempData[ReportTempDataName] as KardexReportModel;
if (model == null)
{
StiReport emptyStiReport = new StiReport();
return StiMvcViewer.GetReportSnapshotResult(emptyStiReport);
}
ServicePredicateBuilder<DtoEmployee> servicePredicateBuilder = MdsGridViewHelper.CreateGridViewCriteria<DtoEmployee>(model.SelectedEmployeesFiltering, "", 0, 0, new List<string>());
servicePredicateBuilder.PaginationData = null;
MorMamReports morMamReports = new MorMamReports(SecurityContext.GetCurrentUserForReport);
#region بدست آوردن شروط
if (!string.IsNullOrWhiteSpace(model.SelectedEmployeesEmpNoInJsonFormat))
{
var selectedEmpNos = JsonConvert.DeserializeObject<List<int>>(model.SelectedEmployeesEmpNoInJsonFormat);
if (selectedEmpNos.Count > 0)
servicePredicateBuilder.Criteria = servicePredicateBuilder.Criteria.And(q => q.Emp_No, OperatorEnum.Contain, selectedEmpNos);
}
#endregion
StiReport stiReport = morMamReports.GetKardex(
servicePredicateBuilder,
model.StartPersianDateTime,
model.EndPersianDateTime,
Resources.Menu_131213,
string.Format("{0} {1} {2} {3}", Resources.FromDate, model.StartPersianDateTime.ToShortDateString(), Resources.ToDate, model.EndPersianDateTime.ToShortDateString()),
model.ShowEachGroupInSeperatedPage,
model.ShowReportSectionBySection ? GroupByItemEnum.Section : GroupByItemEnum.Employee);
return StiMvcViewer.GetReportSnapshotResult(stiReport);
}
[AuthorizeUser(Permissions = "131213")]
public ActionResult KardexViewerEvent()
{
return StiMvcViewer.ViewerEventResult();
}
Я нашел проблему, но я не знаю, как ее решить, у меня есть прототипы javascript, они вызывают эту ошибку? В отчете Stimulsoft Report необходимо использовать 'for (var i = 0; i