Dynamic image URL

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hi,

Is it possible to dynamically ammend an image URL based on the data returned?

We are hopefully attempting to bring GIS and BO together seamlessley! fingers crossed.

Cheers

Foxy

Yes, this is a new feature for CR XI that I wrote about on page 334 of my book. The Graphic object has a formula button on the Picture tab of the Format Editor. You can set it to a URL or a database field.

Also, I see that you are in the UK. I need to find someone who can post some images from my book on the Amazon.co.uk site b/c it won't let me since I live in the US. If you can post the pictures for me, please PM me and I will send them to you. I would really appreciate it.


Brian

can you kindly explain as to how we can achieve this

Sure. Choose Insert > Picture. Choose a default image to show and save it. Right-click on it and select Format Graphic. Go to the Picture tab and click the formula button for Graphic location. Enter a formula or url or field name and save it. Preview the report and it will show the image using whatever value is in your formula.
Thanks for this brian, but I cant get it to work, it is just bringing back the default image every time.
It is just the last 4 digits of the URL that are changing based on a parameter in the report. The formula I have in the formula editor looks like this:
 
 
 


Edited by foxy - 24 Oct 2007 at 12:19am

I have also tried just putting in the URL of the test image that you use in your book (below)

This still doesn't work, it returns the default image i have selected. Am I missing some settings that will enable this to work?
 

"http://www.crystalreportsbook.com/forum/avatars/animal_butterfly_neg.jpg"

 
 


Edited by foxy - 24 Oct 2007 at 3:02am
It only shows the default picture when it can't find the URL specified. There really isn't anything else to do. What about mapping it to a local file on your computer? Maybe the report isn't able to connect to the internet for some reason...
Right, it works whenever I map the image to a file on my hard drive.
 
When I use a URL for the image, Crystal seems to be creating a new dial up connection in my internet options.
 
What options are there that I can change to stop crystal doing this, and force it to use my LAN connection?
I don't know how to do that. I have a similar problem with ANY internet connection when I have a dial-up connection installed. I have to go into the IE settings and tell it to only use the dial-up when I specifically tell it to. Sometimes this works and sometimes it doesn't. If its not to much trouble, I would delete the dial-up connection from your computer till you get the report tested and working then add it back afterwards. 
I dont need a dial up connection at all as my machine is on the company's network. Usually I would not have any dial up connection listed and the settings would say to never dial a connection.
 
But when I run the crystal report, a dial up connection is created in the internet options.
 
Is there no way to force crystal to use the LAN connection?
That's weird. Never happened to me ever. Something else is going on behind the scenes that needs to be figured out. I can't imagine why CR would create a dial-up connection for your computer.  

????
Thanks brian,
 
there is possibly a setting on my PC that is forcing a dial up connection to be created when a program cant connect through the LAN. This is something I will investigate.
 
Is there a reason that crystal would not be able to use my LAN connection (are there some settings for this?
 
Is my format for the URL correct?
 
I'm just trying to think of everything possible that could be affecting it.
Yes, the URL is correct. It always works fine on my computer and I can't explain what is going on with your computer. I have no idea why CR won't connect to your LAN. That would be a setup/network admin issue to resolve. Sorry.
Ok brian, thanks very much for your efforts, much appreciated.
I have an acess data base and when I am printing my report I everything working  and I can bring over my data and I have the sql statement working to select only the data I need . I have a photofile field and this is the name of the JPG file that attaches to this record. I have have inserted a picture on the report and I want to print the picture that corrisponds to the record. How do I do this?
 
 
cliff
 
Make sure you have your forward slashes and backslashes correct. That can make a huge difference.
Hi Brian,

I did the exact steps to display image from url stored in database in Crystal Report 11.

But it didn't work for me.
My database field is holding the following web url
"https://www.cia.gov/library/publications/the-world-factbook/graphics/flags/large/us-lgflag.gif"
How would I send the attachment?
Hi Brian,
 
I want to explore this feature of CR XI. I am using Salesforce Database which hoold image in the form of URL.
I want to display image in my CR. I already treid the step you mention. But it is not displaying image from database but display the static image.
 
Can you please help me.
Appreciated..
 
Alpa