کانال بله, جهت پشتیبانی و اطلاع رسانی کانال بله, جهت پشتیبانی و اطلاع رسانی
عضویت

آموزش نمایش گزارشات در Flash Viewer Stimulsoft

آموزش نمایش گزارشات در Flash Viewer Stimulsoft

برای نمایش گزارش، باید StiNetCoreViewerFx را به صفحه اضافه کنید و property های لازم را روی آن مقداردهی کنید. و در view controller متد مورد نیاز را مشخص کنید.


...
@Html.StiNetCoreViewerFx(new StiNetCoreViewerFxOptions() {
Actions =
{
GetReport = "GetReport",
ViewerEvent = "ViewerEvent"
}
})
...


 
HomeController.cs
...
public IActionResult GetReport()
{
StiReport report = new StiReport();
report.Load(StiNetCoreHelper.MapPath(this, "Reports/SimpleList.mrt"));
 
return StiNetCoreViewerFx.GetReportResult(this, report);
}
 
public IActionResult ViewerEvent()
{
return StiNetCoreViewerFx.ViewerEventResult(this);
}
...

در مثال بالا، اجرای دو action از viewer مشخص شده است. GetReport action گزارش آماده برای پیش نمایش را برمی گرداند و ViewerEvent action رویدادهای viewer را handle می کند.

افزودن ViewerEvent action اجباری است. بدون آن انجام عملیات روی viewer امکان پذیر نیست.


نمایش گزارشات در Flash Viewer

اگر گزارش قبل از نمایش render نشده باشد، Flash Viewer component آن را به طور خودکار render می کند. می توانید از report template ها و گزارشات render شده برای نمایش گزارش استفاده کنید.


HomeController.cs
...
public IActionResult GetReport()
{
StiReport report = new StiReport();
report.LoadDocument(StiNetCoreHelper.MapPath(this, "SimpleList.mdc"));
 
return StiNetCoreViewerFx.GetReportResult(this, report);
}
...
1398/07/11 1982 0
نظرات شما

نظرات خود را ثبت کنید...