Company Logo on Report
Company Logo on Report
I need a suggestion on how to go about with this senario.
I will but an image in a folder (C:\App\Report\Settings\Logo\CompanyLogo.jpg)
If I update this image i need it to reflect in the reports for this how do I add it to report header?
Image ?
File ?
Image URL ?
of an Image property ???
I will but an image in a folder (C:\App\Report\Settings\Logo\CompanyLogo.jpg)
If I update this image i need it to reflect in the reports for this how do I add it to report header?
Image ?
File ?
Image URL ?
of an Image property ???
Company Logo on Report
For the Web based reports using of Image URL would be the best.
Thank you.
Thank you.
Company Logo on Report
For Windows Apps ?
Company Logo on Report
For Windows Forms application it is ok to use any of this properties.
If you need replace the source image file, then you need to use the following technique in BeforePrintEvent of the Image1 component , to avoid locking of the source image file:
Thank you.
If you need replace the source image file, then you need to use the following technique in BeforePrintEvent of the Image1 component , to avoid locking of the source image file:
Code: Select all
Image bmp = null;
System.IO.FileStream stream = null;
string fileName = "C:\\App\\Report\\Settings\\Logo\\CompanyLogo.jpg";
try
{
stream = new System.IO.FileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
byte[] buf = new byte[stream.Length];
stream.Read(buf, 0, buf.Length);
bmp = Image.FromStream(new System.IO.MemoryStream(buf));
}
catch
{
}
finally
{
if (stream != null) stream.Close();
}
Image1.Image = bmp;
Company Logo on Report
Thank you very much for the help.
Just tried it out now.
I feel you should the clip above as a FAQ to your documentation also,because this will be helpful.
I got one more q I'll try to post in a sep thread.
Just tried it out now.
I feel you should the clip above as a FAQ to your documentation also,because this will be helpful.
I got one more q I'll try to post in a sep thread.
Company Logo on Report
You are welcome.
Let us know if any help is required.
Thank you.
Let us know if any help is required.
Thank you.
Company Logo on Report
For anyone else following this...
Senario:
Say I have a folder Report with subfolder which contain report and one subfolder with a logo of the company.
Report\EmpReports
....
...
.
Report\Settings\Logo
I need to change the logo from customer to customer..so I may make some way to add the logo.jpg file to Report\Settings\Logo (as a app option)
Now If I have a report viewer app where I select a report and render it to the viewer control.
How can I set the path for the logo in each report??
In the above mentioned code you can add
string fileName = Application.StartupPath + "\\Reports\\Logo\\Company_Logo.jpg";
This is one way to solve the issue,this way just put the new file there and report will get it from there.
Senario:
Say I have a folder Report with subfolder which contain report and one subfolder with a logo of the company.
Report\EmpReports
....
...
.
Report\Settings\Logo
I need to change the logo from customer to customer..so I may make some way to add the logo.jpg file to Report\Settings\Logo (as a app option)
Now If I have a report viewer app where I select a report and render it to the viewer control.
How can I set the path for the logo in each report??
In the above mentioned code you can add
string fileName = Application.StartupPath + "\\Reports\\Logo\\Company_Logo.jpg";
This is one way to solve the issue,this way just put the new file there and report will get it from there.