Question

I want to use in my MVC Controller StimulSoft,I use this code:

 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);

But I do not see anything,I do not use anything in my cshtml file

Was it helpful?

Solution

In .cshtml file we must to use this code:

<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)
 })
)

OTHER TIPS

Because the Show() method is for WinForms applications. Look at the sample projects in the distributive.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top