private void Detail1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { pictureBox1.ImageUrl = "http://YourNoImageAvailableURLGoesHere.jpg"; var serviceUrl = "https://YourMapServiceURLGoesHere/MapServer/0/"; var fid = GetCurrentColumnValue("OBJECTID"); var attachmentsUrl = serviceUrl + fid + "/attachments?f=json"; using (var wc = new System.Net.WebClient()) { using (var stream = wc.OpenRead(attachmentsUrl)) { var serializer = new Newtonsoft.Json.JsonSerializer(); using (var sr = new System.IO.StreamReader(stream)) using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(sr)) { var response = serializer.Deserialize(jsonTextReader); var infos = response["attachmentInfos"] as Newtonsoft.Json.Linq.JArray; if (infos != null) { var info = System.Linq.Enumerable.FirstOrDefault(infos, (x) => { var contentType = (string)x["contentType"]; if (!string.IsNullOrEmpty(contentType) && contentType.StartsWith("image/")) { return true; } return false; }); if (info != null) { var imageUrl = serviceUrl + fid + "/attachments/" + info["id"].ToString(); pictureBox1.ImageUrl = imageUrl; pictureBox1.Visible = true; } } } } } }