
نوشته شده توسط
keyvan_s89
یه دونه New Variable بساز از نوع image با اسم مثلا Pic بعد درگ کن و Save
تویه کد نویسی هم
stireport.Dictionary.Variables["pic"].ValueObject = pictureBox1.Image;
سلام . مرسی دوست عزیز
ببین من الان عکس ها رو در یک فولدر ذخیره کردم و می خوام آدرسش رو بهش بدم . از این کد استفاده کردم
StiReport stiReport1 = new StiReport();
stiReport1.Load("Reports\\Patient_Card.mrt");
stiReport1.Dictionary.Databases.Clear();
stiReport1.Dictionary.Databases.Add(new StiSqlDatabase("Connection", ConfigurationManager.AppSettings["ConnectionString"]));
stiReport1.Dictionary.DataSources["DS1"].Parameters[0].Value = textBox1.Text;
if (File.Exists(Application.StartupPath + "\\Images\\P-IMG\\" + textBox1.Text + "" + ".jpg"))
{
string a = Application.StartupPath + "\\Images\\P-IMG\\" + textBox1.Text + "" + ".jpg";
stiReport1.Dictionary.Variables["pic"].ValueObject = a;
}
else
{
string b = Application.StartupPath + "\\Images\\ico\\N0.png";
stiReport1.Dictionary.Variables["pic"].ValueObject = b;
}
stiReport1.Show();
اما این Error و بهم میده
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters.