image in web report
image in web report
Hi,
In Designer it is possible to show an image as a header in the report.
Once I copied the report to the website and view it online the image has disappeared.
The Designer offers several ways to include an image in the report.
I have tried them all.
What is the best way to include an image as a header in the report.
Thanks in advance!
roger
In Designer it is possible to show an image as a header in the report.
Once I copied the report to the website and view it online the image has disappeared.
The Designer offers several ways to include an image in the report.
I have tried them all.
What is the best way to include an image as a header in the report.
Thanks in advance!
roger
image in web report
The best way to show images in StiWebViewer is ImageURL property. Also please try to increase time of the ServerTimeout property.
Thank you.
Thank you.
image in web report
hi dears,
i have a report with an image to show information of employees in web.
i use ImageURL property to show image, also i save name of image in database.
public void imgEmp__GetImageURL(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
{
e.Value = HttpContext.Current.Server.MapPath("~/EmpImages/") + ToString(sender, Emp.EmpPhoto);
}
but unfortunately i can't load images in WebViewer.
could you please help me
i have a report with an image to show information of employees in web.
i use ImageURL property to show image, also i save name of image in database.
public void imgEmp__GetImageURL(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
{
e.Value = HttpContext.Current.Server.MapPath("~/EmpImages/") + ToString(sender, Emp.EmpPhoto);
}
but unfortunately i can't load images in WebViewer.
could you please help me
image in web report
Hello,
If you enter in ImageURL property path to image it work?
Thank you.
If you enter in ImageURL property path to image it work?
Thank you.
image in web report
thanks a lot
i have exported my report in a C# file and use that in my web application.
i changed code :
this.imgEmployee.ImageURL = new StiImageURLExpression(HttpContext.Current.Server.MapPath("~/EmployeeImages/abc.jpg");
but i could not load image in viewer.
i have exported my report in a C# file and use that in my web application.
i changed code :
this.imgEmployee.ImageURL = new StiImageURLExpression(HttpContext.Current.Server.MapPath("~/EmployeeImages/abc.jpg");
but i could not load image in viewer.
image in web report
Hi James,
Please assign the following property:
Image1.ImageURLValue = "http://www.myurl";
It is possible also in the code of the report, i.e. in the BeforePrintEvent of the page.
Thank you.
Please assign the following property:
Image1.ImageURLValue = "http://www.myurl";
It is possible also in the code of the report, i.e. in the BeforePrintEvent of the page.
Thank you.
image in web report
hi dear Edward . sorry for my delay.
i changed my code:
this.imgEmployee.ImageURLValue = "d:\abc.jpg";
it did not work, after that i changed my code again:
public void Page1_BeforePrint(object sender, System.EventArgs e)
{
this.imgEmployee.ImageURLValue = "d:\abc.jpg";
}
but StiWebViewer did not load image.
i changed Stimulsoft assembly to last version and test previous actions, but ...
i don't know what can i do to solve my problem!!
thanks
i changed my code:
this.imgEmployee.ImageURLValue = "d:\abc.jpg";
it did not work, after that i changed my code again:
public void Page1_BeforePrint(object sender, System.EventArgs e)
{
this.imgEmployee.ImageURLValue = "d:\abc.jpg";
}
but StiWebViewer did not load image.
i changed Stimulsoft assembly to last version and test previous actions, but ...
i don't know what can i do to solve my problem!!
thanks
image in web report
Hi James,
Was the folder you tried to access accessible? Maybe the path was not correct?
Thank you.
Was the folder you tried to access accessible? Maybe the path was not correct?
Thank you.
image in web report
hi
the path is real and correct, i tested it:
this.imgEmployee.ImageURLValue = "~/img.jpg";
or
this.imgEmployee.ImageURLValue = "d:\img.jpg";
but i can not do that.:amazed:
by the way, i have Stimulsoft.Report 2007 and use it.
does it work well?
Thank you
the path is real and correct, i tested it:
this.imgEmployee.ImageURLValue = "~/img.jpg";
or
this.imgEmployee.ImageURLValue = "d:\img.jpg";
but i can not do that.:amazed:
by the way, i have Stimulsoft.Report 2007 and use it.
does it work well?
Thank you
image in web report
Hello,
Please add following method in your report code:
Also you need add usings to:
After then in BeforePrintEvent of image component:
Thank you.
Please add following method in your report code:
Code: Select all
public static Image LoadBitmap(string url)
{
WebClient cl = new WebClient();
cl.Credentials = CredentialCache.DefaultCredentials;
byte [] bytes = cl.DownloadData(url);
cl.Dispose();
MemoryStream stream = new MemoryStream(bytes);
return new Bitmap(stream);
}
Code: Select all
System.IO
System.Net
Code: Select all
Image1.ImageToDraw = LoadBitmap("http://www.stimulsoft.com/Images/Logo/stimulsoft.logo.png");
- Attachments
-
- 178.Sample.png (101.75 KiB) Viewed 3990 times