add logo to a report
Posted: Mon Dec 12, 2011 4:17 am
Hello,
Using version 2011.2.1004.0, and this code in client side :
//add logo
if (logodata != null)
{
BitmapImage bitmap = new BitmapImage();
bitmap.SetSource(new MemoryStream(logodata));
StiVariable logo = new StiVariable("My variables", "Logo", "Logo", "", typeof(System.Drawing.Bitmap), "", false, false, false);
logo.ValueObject = bitmap;
report.Dictionary.Variables.Clear();
report.Dictionary.Variables.Add(logo);
report.Dictionary.Synchronize();
}
and this code in server side :
if (logodata != null)
{
System.Drawing.Image image = System.Drawing.Image.FromStream(new MemoryStream(logodata));
StiVariable logo = new StiVariable("My variables", "Logo", "Logo", "", typeof(System.Drawing.Bitmap), "", false, false, false);//new StiVariable("My Variables", "Logo", "Logo", image);// // ***********
logo.ValueObject = image;
_report.Dictionary.Variables.Clear();
_report.Dictionary.Variables.Add(logo);
_report.Dictionary.Synchronize();
}
The result : it works fine in client , but doesn't work in server!
==================================================
After upgrading to the new version : 2011.3.1200.0 with same code ,
The result : it works fine in server , but doesn't work in client !!
any suggestions about that ?
Thanks in advance
Regards,
Jalal Khalil
Using version 2011.2.1004.0, and this code in client side :
//add logo
if (logodata != null)
{
BitmapImage bitmap = new BitmapImage();
bitmap.SetSource(new MemoryStream(logodata));
StiVariable logo = new StiVariable("My variables", "Logo", "Logo", "", typeof(System.Drawing.Bitmap), "", false, false, false);
logo.ValueObject = bitmap;
report.Dictionary.Variables.Clear();
report.Dictionary.Variables.Add(logo);
report.Dictionary.Synchronize();
}
and this code in server side :
if (logodata != null)
{
System.Drawing.Image image = System.Drawing.Image.FromStream(new MemoryStream(logodata));
StiVariable logo = new StiVariable("My variables", "Logo", "Logo", "", typeof(System.Drawing.Bitmap), "", false, false, false);//new StiVariable("My Variables", "Logo", "Logo", image);// // ***********
logo.ValueObject = image;
_report.Dictionary.Variables.Clear();
_report.Dictionary.Variables.Add(logo);
_report.Dictionary.Synchronize();
}
The result : it works fine in client , but doesn't work in server!
==================================================
After upgrading to the new version : 2011.3.1200.0 with same code ,
The result : it works fine in server , but doesn't work in client !!
any suggestions about that ?
Thanks in advance
Regards,
Jalal Khalil