Reputation: 47
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
Reputation: 47
I solved the problem like this:
StiReport report = new StiReport();
var image = report.GetComponentByName("Image1") as StiImage;
image.CanGrow =false ;
Upvotes: 0