I am trying to create a report using business objects fetched via Entity Framework. I am able to see the business objects when designing the report, but when I am trying to preview the report, the report is empty, even though there exists data in database.
Am I missing something?
This is my controller:
Code: Select all
public ActionResult ExtendedReportDesigner() {
return View();
}
public ActionResult GetReportTemplate() {
StiReport report = new StiReport();
report.Load(Server.MapPath("~/Content/Reports/Templates/BusinessObjectReport.mrt"));
EFContext ctx = new EFContext();
IQueryable<Group> groups = ctx.Groups.Where(t => t.GroupID < 10);
// Register Business Objects for Customers in the report
report.RegBusinessObject("CustomEF","groups", groups);
report.Dictionary.Synchronize();
return StiMvcDesigner.GetReportTemplateResult(report);
}
public ActionResult DataProcessing() {
return StiMvcDesigner.DataProcessingResult(this.Request);
}
public ActionResult GetReportSnapshot() {
return StiMvcDesigner.GetReportSnapshotResult(this.Request);
}
public FileResult ExportReport() {
StiReport report = StiMvcDesigner.GetReportObject(this.Request);
return StiMvcDesignerHelper.ExportReportResult(report, this.Request);
}
...
Code: Select all
@{
ViewBag.Title = "ReportDesigner";
}
<h2>ExtendedReportDesigner</h2>
@using Stimulsoft.Report.Mvc;
@Html.Stimulsoft().StiMvcDesigner(new StiMvcDesignerOptions() {
ActionGetReportTemplate = "GetReportTemplate",
ActionDataProcessing = "DataProcessing",
ActionGetReportSnapshot = "GetReportSnapshot",
ActionExportReport = "ExportReport",
Width = 1000,
Height = 800
})
Code: Select all
<add assembly="Stimulsoft.Base, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Design, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Database, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Report, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Report.Design, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Report.Design.WebViewer, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Report.Helper, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
<add assembly="Stimulsoft.Report.Mvc, Version=2013.1.1600.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a"/>
Adina