0

我想在我的 MVC 控制器 StimulSoft 中使用,我使用以下代码:

 public ActionResult CardReport(CardReportViewModel model)
    {
        IAccount account;
        if (model.AccountId != null)
            account = _accountManager.Get(model.AccountId.Value);
        else
            account = _accountManager.Get(project, model.AccountCode);
        model.AccountId = account.Id;
        model.AccountCode = account.Code;
        var rptt = new StiReport();
        rptt.Dictionary.Synchronize();
        rptt.RegBusinessObject("test", model);
        rptt.Show();

        return View(model);

但我什么也没看到,我的 cshtml 文件中没有使用任何东西

4

2 回答 2

1

在 .cshtml 文件中,我们必须使用以下代码:

<head>
   @Html.Stimulsoft().RenderMvcDesignerScripts()
</head>

@(Html.Stimulsoft().StiMvcDesigner(new StiMvcDesignerOptions()
 {
   ActionGetReportTemplate = "GetCardReportSs",
   LocalizationDirectory = Server.MapPath("~/Content/Localization/"), // Necessary to   get a list of available localization files
   ActionDataProcessing = "DataProcessing",
   Width = Unit.Percentage(300),
   Height = Unit.Pixel(800)
 })
)
于 2013-12-28T06:31:21.963 回答
0

因为 Show() 方法适用于 WinForms 应用程序。查看分发中的示例项目。

于 2013-12-27T11:35:15.220 回答