Print Page | Close Window

Dynamic image URL

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1550
Printed Date: 27 Apr 2024 at 4:29pm


Topic: Dynamic image URL
Posted By: foxy
Subject: Dynamic image URL
Date Posted: 23 Oct 2007 at 2:47am

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



-------------
FOXY



Replies:
Posted By: BrianBischof
Date Posted: 23 Oct 2007 at 10:34am
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



-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: somnath.roy
Date Posted: 23 Oct 2007 at 11:40am

can you kindly explain as to how we can achieve this



Posted By: BrianBischof
Date Posted: 23 Oct 2007 at 12:00pm
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.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: foxy
Date Posted: 24 Oct 2007 at 12:10am
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:
 
 
" http://maps...........=SCH&gotoLayer=SCH&gotoField=DFESNO&gotoValue=+%7b?DFEE_Number - http://maps...........=SCH&gotoLayer=SCH&gotoField=DFESNO&gotoValue="+{?DFEE_Number }
 


-------------
FOXY


Posted By: foxy
Date Posted: 24 Oct 2007 at 2:56am

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 - http://www.crystalreportsbook.com/forum/avatars/animal_butterfly_neg.jpg "

 
 


-------------
FOXY


Posted By: BrianBischof
Date Posted: 24 Oct 2007 at 9:48am
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...

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: foxy
Date Posted: 29 Oct 2007 at 2:16am
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?


-------------
FOXY


Posted By: BrianBischof
Date Posted: 29 Oct 2007 at 8:49am
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. 

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: foxy
Date Posted: 29 Oct 2007 at 8:53am
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?


-------------
FOXY


Posted By: BrianBischof
Date Posted: 29 Oct 2007 at 9:16am
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.  

????

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: foxy
Date Posted: 30 Oct 2007 at 1:18am
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.


-------------
FOXY


Posted By: BrianBischof
Date Posted: 30 Oct 2007 at 7:13am
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.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: foxy
Date Posted: 30 Oct 2007 at 7:23am
Ok brian, thanks very much for your efforts, much appreciated.

-------------
FOXY


Posted By: Clifford
Date Posted: 09 Nov 2007 at 5:01pm
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
 


-------------
Cliff Sutton
VE2YU


Posted By: drk2cmp
Date Posted: 16 Sep 2009 at 3:50pm
Make sure you have your forward slashes and backslashes correct. That can make a huge difference.


Posted By: alpa
Date Posted: 25 Feb 2013 at 3:37am
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?


Posted By: alpa
Date Posted: 05 Mar 2013 at 10:10am
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



Print Page | Close Window