2

I want to pass my logo byte array that fetched from sql database(varbinary) to my stimulsoft report using variable and show in Image component on header.

Can anyone help with that?

Noam M
  • 3,156
  • 5
  • 26
  • 41
Kūrosh
  • 442
  • 1
  • 5
  • 22

1 Answers1

6
byte[] ImageByteArray = ReadLogoFromSqlDataBase();
MemoryStream ms = new MemoryStream(ImageByteArray);
System.Drawing.Image image = System.Drawing.Image.FromStream(ms);

StiReport rpt = new StiReport();
rpt.ReportFile = "rpt1.mrt";
rpt.Dictionary.Variables.Add("Logo", image);
rpt.Design(); or rpt.Print();
Kūrosh
  • 442
  • 1
  • 5
  • 22