I am using ASP.net with c# to load crystal report. I would like to know how i can load an image in the Report Header section of the report dynamically from aspx page.
Thank you very much for your help. I tryied that way already. But unluckily, I can't get the image. Instead of displaying the barcode image, it displays the text: "barcode.jpg". Do you know that why this error happens Currently I'm using Crystal Report in Visual Studio 2003. I registered already so I guess I'm using the full version of Crystal Report. Please help me solve this problem.
Dear all, I've made a
report using VB6 + CR8.5 with dinamically loaded images. I have a
problem though when I export the report to another format. All the
images are displayed using the originally loaded image (the one that
displays in the designer) instead of those that are shown at runtime
within the report.
To add a linked OLE Object to your report you right click on the report surface and choose Insert|Ole Object. This will bring up the Insert Object dialog and from here select Create From File, browse to the file and then make sure you check the Link box.
Now when you run the report it will grab the updated barcode.jpg file that you created and view that in the report.
As long as the OLE Object is linked (by following the steps in the KBASE) the only other issue is detailed in the NOTE. Please investigate that avenue as it is very important.
I am having the same sort of problems while displaying image using CR.NET and VS.NET 2003. Let me epxlain what I want to do.
I have designed reports using CR.NET that I intend to sell to various clients. I want to display client logos on the reports. I don't want to design a separate report for each client. I want to change the logo of my reports dynamically at runtime.
I have tried inerting OLE object and create image from file option (checked the linking option too). I first tried this approach on my company's system and it didn't work. I then tried the same procedure on my home system and the approach works perfectly. Whenever I change the image on file system, the report displays the new image.
The only difference b/w my office and home system was that I first installed Crystal Reports 9 on my home system to check the aforementioned approach as I was not sure whether this approach will work with CR.NET. After having the positive results, I uninstalled Crystal Reports 9. Then I uninstalled CR.NET and installed it again.
While I was applying the OLE object approach on my office system, the designer was not even rendering the image properly and displays the name of the image file too. I don't think it was because of access rights, as I was logged on to both systems using the Administrator account.
Can anyone please let me know what can be wrong with my office system.
If this is not a file path held in a database, then you could look at using a linked OLE Object. You could then programatically update the physical file with the image you wanted and Crystal Reports would load it and render it in the Report Header.
Dear All, I am facing the same problem using C#.Net and ASP.Net ( VS.Net 2003 and crystal reports bundled with it ), here is the detailed scnerio:
I have created a linked object which points to .bmp file with the name logo.bmp. Report runs fine and image appears fine when called in an ASP.Net page. But later when i replace the logo.bmp with another image with same name logo.bmp but different image. Then i call the report again but instead of showing the new image it kept showing the old one.
Then i open the report in report designer this time it updates the link and in desinger new logo appeared. I saved the report and run my ASP.Net application again and this time new logo appeared.
I will really appreciate if there is any solution other than opening report again and saving it b/c for every client i can't repeat this excercise on lots of reports.
My application is web based application. I tried with bmp image. First, I use my application to create a bmp image. After that, I add an OLE Object and browse to this bmp image. It displayed this image correctly. When the next time and create a new report, the bmp image is updated but the crystal report still haven't been updated, it still keep the old image. BTW, there's no problem with read and write image, so I think the image is accessible because I use my application to create and read the image.
One point that I recovered is that: if I insert an OLEObject, its class is ICROleObject. But when I insert a PictureObject, its class is also ICROleObject. So does it mean that there's no difference between OLEObject and PictureObject which is only support static image I'm really confused.
Does the image render properly when you enter it in the report the first time Can you try another image type like a bitmap
Is this a web or windows application Either way you need to ensure that the OLE object file is saved in a location that can be accessed by the accounts being used to authenticate your web application users or is accessible to the windows user.
I need to create a report with a barcode for each registration (event registration) in the header of the report. Everytime a registration is confirmed, I will produce a barcode, load it to a report, next convert this report to the pdf file and send out an email. When a barcode is produce, I save it in a file called barcode.jpg and it will override the old barcode.jpg file. So I want to load the barcode.jpg image at running time into my report.
In this case, I don't use anything related to database. Just load image from physical file dynamically to the report at running time. I search for code in C# for so long but haven't found. Please tell me how to program with linked OLE Object so that I can update my physical file as your above suggestion.
Please help me again. I'm a bit stupid. I still can't figure it out. I read the article from the link above and I also download the NOTE and read it. However, I really don't know what and where is my Crystal Enterprise Server. What I have is Visual Studio .NET 2003 and I use: Right Click on Project, choose Add New Item... -> choose Crystal Report. When using Crystal Report, I just choose Register and received registration number and keycode. I didn't install anything else regarding CE.
To get the image, I use OLE Object with check Link. I guess I need some permission configuration in order to make it work. However, follow the NOTE, I can't find any CE component. I don't have the thing called Start -> Programs -> Crystal Enterprise folder. It leads me more and more confusions. Would you please tell me more detail how to check permission on some particular folders or I have to buy a product so that I can do my job or what else I have to do
Please help me. I need it done early to close my project. Million thanks for your help.
How to load image dynamically
HiralJB
Thank you very much for your help. I tryied that way already. But unluckily, I can't get the image. Instead of displaying the barcode image, it displays the text: "barcode.jpg". Do you know that why this error happens Currently I'm using Crystal Report in Visual Studio 2003. I registered already so I guess I'm using the full version of Crystal Report. Please help me solve this problem.
Million thanks to you.
Mai Lan
rhombus
I've made a report using VB6 + CR8.5 with dinamically loaded images. I have a problem though when I export the report to another format. All the images are displayed using the originally loaded image (the one that displays in the designer) instead of those that are shown at runtime within the report.
Can anyone help me please
JP
sleddd
To add a linked OLE Object to your report you right click on the report surface and choose Insert|Ole Object. This will bring up the Insert Object dialog and from here select Create From File, browse to the file and then make sure you check the Link box.
Now when you run the report it will grab the updated barcode.jpg file that you created and view that in the report.
Keith - Business Objects
Kevin Irl
damned
Although this article references ASP and Crystal Reports 8.5 it still applies to your situation.
http://support.businessobjects.com/library/kbase/articles/c2010639.asp
As long as the OLE Object is linked (by following the steps in the KBASE) the only other issue is detailed in the NOTE. Please investigate that avenue as it is very important.
Keith - Business Objects
MVP User120890
I am not sure how Crystal Enterprise got involved. Please check the kbase article referenced.
http://support.businessobjects.com/library/kbase/articles/c2010639.asp
The critical part of the kbase is the NOTE: section.
Keith - Business Objects
Tony Wang198
Hello All,
I am having the same sort of problems while displaying image using CR.NET and VS.NET 2003. Let me epxlain what I want to do.
I have designed reports using CR.NET that I intend to sell to various clients. I want to display client logos on the reports. I don't want to design a separate report for each client. I want to change the logo of my reports dynamically at runtime.
I have tried inerting OLE object and create image from file option (checked the linking option too). I first tried this approach on my company's system and it didn't work. I then tried the same procedure on my home system and the approach works perfectly. Whenever I change the image on file system, the report displays the new image.
The only difference b/w my office and home system was that I first installed Crystal Reports 9 on my home system to check the aforementioned approach as I was not sure whether this approach will work with CR.NET. After having the positive results, I uninstalled Crystal Reports 9. Then I uninstalled CR.NET and installed it again.
While I was applying the OLE object approach on my office system, the designer was not even rendering the image properly and displays the name of the image file too. I don't think it was because of access rights, as I was logged on to both systems using the Administrator account.
Can anyone please let me know what can be wrong with my office system.
Regards,
Jehanzeb
Yoni Rapoport
Which version of Crystal Reports are you using
If you are trying to load an image based on a file path from a database then this is a new feature that was introduced in our latest version, Crystal Reports XI.
http://support.businessobjects.com/library/kbase/articles/c2014707.asp
If this is not a file path held in a database, then you could look at using a linked OLE Object. You could then programatically update the physical file with the image you wanted and Crystal Reports would load it and render it in the Report Header.
Keith - Business Objects
ryanlifferth
Dear All,
I am facing the same problem using C#.Net and ASP.Net ( VS.Net 2003 and crystal reports bundled with it ), here is the detailed scnerio:
I have created a linked object which points to .bmp file with the name logo.bmp. Report runs fine and image appears fine when called in an ASP.Net page. But later when i replace the logo.bmp with another image with same name logo.bmp but different image. Then i call the report again but instead of showing the new image it kept showing the old one.
Then i open the report in report designer this time it updates the link and in desinger new logo appeared. I saved the report and run my ASP.Net application again and this time new logo appeared.
I will really appreciate if there is any solution other than opening report again and saving it b/c for every client i can't repeat this excercise on lots of reports.
Regards
donovanf
My application is web based application. I tried with bmp image. First, I use my application to create a bmp image. After that, I add an OLE Object and browse to this bmp image. It displayed this image correctly. When the next time and create a new report, the bmp image is updated but the crystal report still haven't been updated, it still keep the old image. BTW, there's no problem with read and write image, so I think the image is accessible because I use my application to create and read the image.
One point that I recovered is that: if I insert an OLEObject, its class is ICROleObject. But when I insert a PictureObject, its class is also ICROleObject. So does it mean that there's no difference between OLEObject and PictureObject which is only support static image I'm really confused.
Mai Lan
JeffreyS
Hello Mai,
Does the image render properly when you enter it in the report the first time Can you try another image type like a bitmap
Is this a web or windows application Either way you need to ensure that the OLE object file is saved in a location that can be accessed by the accounts being used to authenticate your web application users or is accessible to the windows user.
Keith - Business Objects
Tomsmaily
I need to create a report with a barcode for each registration (event registration) in the header of the report. Everytime a registration is confirmed, I will produce a barcode, load it to a report, next convert this report to the pdf file and send out an email. When a barcode is produce, I save it in a file called barcode.jpg and it will override the old barcode.jpg file. So I want to load the barcode.jpg image at running time into my report.
In this case, I don't use anything related to database. Just load image from physical file dynamically to the report at running time. I search for code in C# for so long but haven't found. Please tell me how to program with linked OLE Object so that I can update my physical file as your above suggestion.
Thank you very much.
NickC999
Please help me again. I'm a bit stupid. I still can't figure it out. I read the article from the link above and I also download the NOTE and read it. However, I really don't know what and where is my Crystal Enterprise Server. What I have is Visual Studio .NET 2003 and I use: Right Click on Project, choose Add New Item... -> choose Crystal Report. When using Crystal Report, I just choose Register and received registration number and keycode. I didn't install anything else regarding CE.
To get the image, I use OLE Object with check Link. I guess I need some permission configuration in order to make it work. However, follow the NOTE, I can't find any CE component. I don't have the thing called Start -> Programs -> Crystal Enterprise folder. It leads me more and more confusions. Would you please tell me more detail how to check permission on some particular folders or I have to buy a product so that I can do my job or what else I have to do
Please help me. I need it done early to close my project. Million thanks for your help.
Mai Lan
Karthik Mani
a possible solution is to place the image into a dataset. at runtime you can dynamically load an image into the dataset and bind it to the report.
hth