SAEED SAEEDI
SAEED SAEEDI

Reputation: 47

How set postion and size image variables Stimulsoft Core?

I am using stimulsoft for ASP.NET Core MVC. I want to get image variables and set setting properties for image. This my code:

public ActionResult GetReportSnapshot(string sort)
{
        StiReport report = new StiReport();
        report.Load(Server.MapPath("~/Reports/Jobs.mrt"));

        report["@PrjectId"] = 1;
        report["@OrderBy"] = sort;
      
        // this is the problem:
        report.Dictionary.Variables["image"].width=5
    
        report.Render();
}

Upvotes: 0

Views: 178

Answers (1)

SAEED SAEEDI
SAEED SAEEDI

Reputation: 47

I solved the problem like this:

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

Upvotes: 0

Related Questions