نمایش نتایج 1 تا 1 از 1

نام تاپیک: خطای استیمول

  1. #1
    کاربر دائمی
    تاریخ عضویت
    اردیبهشت 1393
    محل زندگی
    ایران
    پست
    487

    خطای استیمول

    سلام
    این خطا رو وقتی میخوام گزارش استیمول رو بگیرم دارم.
    وقتی با sp دیتا رو میخونم مشکلی نیست اما به دلایلی میخوام از sp استفاده نکنم و سمت کد دیتا رو به گزارش پاس بدم اما خطا میده :

    System.ArgumentNullException: Value cannot be null. Parameter name: value at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) at Stimulsoft.Report.Mvc.StiMvcViewer.SaveReportObjec t(HttpContextBase httpContext, StiReport report) at Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapsh otResult(StiReport report) at SPMS.Controllers.ReportController.PackageCommandPr int(String startDate, String endDate, Int32 profileId) in D:\Projects\SPMS\SPMS\Controllers\ReportController .cs:line 83




    نکته جالب اینجاست که این خطا رو برای گزارش خالی هم دارم .

    public ActionResult PackageCommandPrint(string startDate, string endDate, int profileId)
    {
    try
    {
    List<PackageCommand> commands = new List<PackageCommand>();
    StiReport report = new StiReport();
    report.Load(Server.MapPath("~/Content/Reports/PackageCommand.mrt"));
    //report.Load(Server.MapPath("~/Content/Reports/Report.mrt"));
    if (HttpContext.Cache["PackageCommands"] == null)
    {
    using (SPMSEntities db = new SPMSEntities())
    {
    commands = db.PackageCommands.ToList();
    HttpContext.Cache.Insert("PackageCommands", commands, null, DateTime.Now.AddMinutes(15), Cache.NoSlidingExpiration);
    }
    }
    else
    {
    commands = HttpContext.Cache["PackageCommands"] as List<PackageCommand>;
    }
    string userFullName;
    using (SPMSEntities db = new SPMSEntities())
    {
    Profile profile = db.Profiles.Find(profileId);
    userFullName = profile.FirstName + " " + profile.LastName;
    }
    //report["TodayPersianDate"] = Convertor.ToPersianDate(DateTime.Now);
    //report["UserFullName"] = userFullName;
    report.Dictionary.Variables.Add(new StiVariable("Params", "TodayPersianDate", Convertor.ToPersianDate(DateTime.Now)));
    report.Dictionary.Variables.Add(new StiVariable("Params", "UserFullName", userFullName));
    report.RegBusinessObject("Data", commands);
    report.Compile();


    return StiMvcViewer.GetReportSnapshotResult(report);
    }
    catch (Exception e)
    {
    HelperStoreSqlLog.WriteError(e, "PackageCommand");
    return View();
    }
    }



    @using Stimulsoft.Report.Mvc
    @{
    Layout = null;
    }
    @Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
    {
    Localization = "~/Content/Reports/Localization/fa.xml",
    Theme = StiTheme.Office2013,
    ActionGetReportSnapshot = "PackageCommandPrint",
    ActionViewerEvent = "PackageCommandViewer",
    ServerCacheMode = StiCacheMode.None
    })



    Capture.PNG
    آخرین ویرایش به وسیله hmahdavi921 : یک شنبه 31 شهریور 1398 در 08:56 صبح

تاپیک های مشابه

  1. سوال: هاستینگ سرور داخل سازمان احتیاج به نیروی متخصص شبکه (هاستینگ) دارد؟
    نوشته شده توسط bamzi software در بخش توسعه وب (Web Development)
    پاسخ: 5
    آخرین پست: دوشنبه 07 مرداد 1398, 16:28 عصر
  2. تغییر نوع چارت ایجاده شده در استیمول در زمان اجرا با استفاده از استیمول
    نوشته شده توسط adineh67 در بخش ابزارهای گزارش سازی
    پاسخ: 1
    آخرین پست: سه شنبه 11 اسفند 1394, 15:58 عصر
  3. سوال: چگونه یک dataSet که حاوی دو تا dataTable هست را به گزارش استیمول سافت بفرستیم.
    نوشته شده توسط sayanpro در بخش ابزارهای گزارش سازی
    پاسخ: 0
    آخرین پست: جمعه 06 آذر 1394, 17:20 عصر
  4. پاسخ: 0
    آخرین پست: شنبه 28 بهمن 1391, 14:31 عصر

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •