سلام مهندس
در MVC 5 با گزارشگیری استیمول چنین خطایی می ده ؟ لطفا راهنمایی بفرمائید
عکس صفحه خطا در پیوست ارسال گردید
لطفا متن خطا را در همین قسمت قرار بدهید.
An exception of type 'System.NullReferenceException' occurred in Stimulsoft.Report.Mvc.dll but was not handled in user code
Additional information: Object reference not set to an instance of an object.
کد من :
public virtual ActionResult StiReport() { var list = MainReportGetList(DoctorID: null, DepartmentID: null, InsuranceID: null, CreateByID: null, DateStart: "", DateEnd: "", frompage: 0, topage: 0); var mainreport = new Stimulsoft.Report.StiReport(); string a = @"F:\HIS\his\Areas\HISArea\Report\ReportReception.mrt"; mainreport.Load(a); mainreport.Compile(); mainreport.RegBusinessObject("FactorReception\\FactorReception", list); return Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapshotResult(mainreport); }
یکی از object ها null می باشد و شما آن را مدیریت نکردید با با یک break point آن را trace کنید و علت null بود آن را بیابید.
ببخشید منظورتون داده های که از Json می فرستم هست یا object های که از استیمول سافت هستش
هردو را بررسی کنید.
سلام
من برای گزارش گیری از استیمول سافت با asp mvc 5 کار می کنم
اکشن های مربوط به پرینت رو به درستی نوشتم حالا می خوام اونو تو View نمایش و اجرا کنم خط های سبز زیرش می کشه
و Command ها رو نمی شناسه
تو ضمیمه هم عکس رو فرستادم
@using Stimulsoft.Report.Mvc; @{Layout = null; } <html> <head> <title>عنوان</title> </head> <body> <div> @Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions() { Theme = StiTheme.Office2013, ActionGetReportSnapshot = "StiReport", ActionViewerEvent = "ViewerEvent", }) </div> </body> </html>
وقتی اشاره گر رو روی خط ها میبرید چه پیامی را نمایش می دهد؟
با زبان بی زبانی می گوید : SiteMvcViewerOptions.ActionGetReportSnapshot منسوخ شده است، و در نسخه بعدی حذف شده لطفا از Actions.GetReportSnapshot استفاده کنید :
@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions() { Actions = { GetReport = "GetReport", PreviewReport = "PreviewReport", DesignerEvent = "DesignerEvent" } })
به این دلیل نمیشناسه که منسوخ شده.
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)