Heikki Heikki - 2 months ago
282 0

I need to access a row "PersonId" and forwars it to another query as a filter parameter

ASP.NET (C#)

Basics for query comparison

/*
Reporting template. "Created" by Heikki Otsolampi / Finland
*/
using System.Data;
using System.IO;
using System.Diagnostics;

public Image Base64ToImage(string base64String)
{
  // Convert Base64 String to byte[]
  byte[] imageBytes = Convert.FromBase64String(base64String);
  MemoryStream ms = new MemoryStream(imageBytes, 0, 
    imageBytes.Length);

  // Convert byte[] to Image
  ms.Write(imageBytes, 0, imageBytes.Length);
  Image image = Image.FromStream(ms, true);
  return image;
}


private void personpicture_GetValue(object sender, DevExpress.XtraReports.UI.GetValueEventArgs e) {
 var pictureBase64 = Convert.ToString((e.Row as DataRowView).Row["RecordPicture"]);
  if(String.IsNullOrEmpty(pictureBase64))
    return;
  
  e.Value = Base64ToImage(pictureBase64);

}