如何设置位置和大小图像变量 Stimulsoft Core

how set postion and size image Variables Stimulsoft Core

您好,我使用的是 stimulsofr ver mvc 核心。 我想获取图像变量并设置图像的设置属性。 这是我的代码; public ActionResult GetReportSnapshot(字符串排序) {

    StiReport report = new StiReport();
    report.Load(Server.MapPath("~/Reports/Jobs.mrt"));

    report["@PrjectId"] = 1;
    report["@OrderBy"] = sort;

  // this problem
    report.Dictionary.Variables["image"].width=5

    report.Render();

}

嗨,我已经解决了这个问题:

  StiReport report = new StiReport();
  var image = report.GetComponentByName("Image1") as StiImage;
  image.CanGrow =false ;