Programmatically modifying the image

0 Answers 4 Views
Report Parameters
Jesse
Top achievements
Rank 1
Jesse asked on 21 Jan 2026, 09:30 PM
We have an image of a "field" (think farms!) Most of the time we draw a border around the image, but under one condition we don't want the border (when isSystemGenerated is true). I didn't write the original code; I'm trying to fix the bug that the border always shows. I've added the following code, but this may not be the right way to modify the image. (I have very little experience with Telerik Reports).

Our goal is to create a PDF with the image in it—that works, but the border is there when it shouldn't be.
bool isSystemGenerated = layer.JobType == "System";
var showBorder = !isSystemGenerated;

var imageUrl = $"/api/v1/images/account/{dataSource.AccountId}/sublayer/{sublayerId}?
showBorder={showBorder.ToString().ToLower()}";

var paramList = reportModel.Parameters.ToList();
paramList.AddRange(new List<ReportParameter>
{
    new ReportParameter { Name = "imageUrl", Value = imageUrl },
    new ReportParameter { Name = "notes", Value = string.Empty },
    new ReportParameter { Name = "approvedBy", Value = string.Empty },
});
reportModel.Parameters = paramList;
Thanks!

No answers yet. Maybe you can help?

Tags
Report Parameters
Asked by
Jesse
Top achievements
Rank 1
Share this question
or