Error: Text, Primitive, Image, CheckBox is not a valid value for StiStyleComponentType for stimulsoft

Error: Text, Primitive, Image, CheckBox is not a valid value for StiStyleComponentType for stimulsoft

对于报告,我在 wpf 中使用了 stimulsoft。我的打印按钮代码是:

try
        {
            DataTable dta = new DataTable();
            DataSet1.dtDataTable dt = new DataSet1.dtDataTable();
            List<KalaClass> list = MetroDataGrid.ItemsSource as List<KalaClass>;

            foreach (var item in list)
            {
                var row = dt.NewRow();

                row["id"] = item.KalaID;
                row["name"] = item.KalaName;
                row["tedad"] = item.KalaTedad;
                row["pice"] = item.KalaPrice;
                row["info"] = item.KalaTozihat;
                row["date"] = item.KalaDate;

                dt.Rows.Add(row);
            }

            DataSet ds = new DataSet();
            ds.Tables.Add(dt);


            StiReport report = new StiReport();
            report.Load("sReport.mrt");
            report.Dictionary.Clear();
            report.RegData(ds);
            report.Dictionary.Synchronize();
            DateTime today =Convert.ToDateTime( DateTime.Today.ToShortDateString());

            (report.GetComponentByName("txtDate") as StiText).Text = convertDate.toShamsi(today);
            //(report.GetComponentByName("txtName") as StiText).Text = comboBox.SelectionBoxItem.ToString();
            //(report.GetComponentByName("Text1") as StiText).Text = txtid.Text;


            report.Show();
        }

        catch(Exception ex)
        {MessageBox.Show(ex.Message.ToString());
        }

我在

中得到 "Text, Primitive, Image, CheckBox is not a valid value for StiStyleComponentType." 错误
  report.Load("sReport.mrt");

我试过了,但我找不到为什么会出现这个错误。我该如何修复它?

我的 Stimulreport 的 dll 有问题。我删除了它并添加了新版本。所以我修好了。