I'm currently investigating a migration from Reports.WPF to Reports.WEB for a customer.
Currently, we create some reports in the WPF designer and save their definitions as strings in the database.
I'm now trying to use Stimulsoft Reports.Web in our ASP.NET MVC 5 app. I installed all packages and the designer works fine, but I have issues with displaying currently-created reports in the Viewer. I followed this documentation part: https://www.stimulsoft.com/en/documenta ... report.htm
My view for the Viewer looks as follows:
Code: Select all
@using Stimulsoft.Report.Web;
@using Stimulsoft.Report.Mvc;
@using System.Web.UI.WebControls
@{
ViewData["Title"] = "Report - Viewer";
}
@Html.Stimulsoft().StiMvcViewer("MvcViewer1", new StiMvcViewerOptions()
{
Actions =
{
GetReport = "GetReportForViewer",
ViewerEvent = "ViewerEvent"
},
Appearance =
{
ScrollbarsMode = true
}
})
Code: Select all
public virtual ActionResult GetReportForViewer(Guid id)
{
var report = new StiReport();
var customReport = ... // getting our report object from the database
report = new StiReport();
report.LoadFromString(customReport.ReportDefinition); // this is our string definition of the report
DataSet data = .. // getting some additional data for the report as DataSet object
report.RegData("My data", data);
report.Render(true);
return StiMvcDesigner.GetReportResult(report);
}
As soon as I change for example the zoom from 100% to any other value, the report's content appears.
So I guess I must be missing something on the controller side to actually render the report.
In Reports.WPF we additionally call `report.ShowWithWpfRibbonGUI()`, but here it of course doesn't work. I tried calling 'report.Show()', but I got a runtime excepion then: "Assembly 'Stimulsoft.Report.Win' is not found".
Can you help me here please?