on 05-23-2011 2:26 PM
Hi,
I have a requirement to load image from hard drive dynamically based on some conditions. I have googled it and found that we can use RAS. I am using Crystal Reports plugin that comes with RAD 7.0 and I am not sure if this supports RAS. I get Connection Refused to localhost exception. I have used the following code. Any help on this is appreciated.
//Create a new Report Application Session
ReportAppSession reportAppSession = new ReportAppSession();
//Create a Report Application Server Service
reportAppSession.createService("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
//Set the RAS Server to be used for the service. You can also use "localhost" if the RAS server is running on your local machine.
reportAppSession.setReportAppServer("localhost");
//Initialize RAS
reportAppSession.initialize();
cheers,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not clear but RAD is Java so I moved your post to the Java SDK forum.
Include the current version of CR you are using and what you have tried? First thing to do is make it work in Crystal Reports Designer or if you are attempting to add an image at runtime it is possible using RAS in both Java and .NET.
Need the version first to say if that version has the ability though, it was something added to current versions.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don,
I need add one more point here. When I tried adding the image in the Crystal reports Designer it is mapped to that image itself which I have added. There is no way that I could change any path of the file. i have also noticed that at runtime it is creating a .png file and loading it. My original image is .gif file. Hence I left that option and started looking to add dynamically. Any other thoughts / suggesstions on this is appreciated.
Thanks,
Ram
In the XIR2 designer, for images there is a setting that you can use to specify a location to load the image from. You have the option to create a formula for it. I've seen people use database fields that contain the path on disk to load the image, or even use a parameter to say where to find the image. Otherwise, I would suggest looking at our samples as I believe there is a sample on how to add an image to a report using RAS.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.