Normal Topic Static Pictures in a Report (Read 961 times)
Roland
Member
*
Offline


No personal text

Posts: 7
Joined: Jun 29th, 2004
Static Pictures in a Report
Sep 16th, 2010 at 7:41am
Print Post Print Post  
Good morning,
I have pictures for all my items, but in different sizes. On the "LE" in my "DB" Sesame give me one size.
Now I put the pictures in a report and I see them in their own different sizes, is there a way to show the pickture in one size?

Have a nice Day und vielen Dank für Eure Hilfe
Roland
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Static Pictures in a Report
Reply #1 - Sep 16th, 2010 at 1:09pm
Print Post Print Post  
One way to do this is to make the report LE that is bound to your image field invisible. Then add a new, unbound, value box element, and program it like this:
ThisElement = "<IMG SRC='C:\Sesame2\" + Image + "' width='100'>"

A few notes:
1. Replace "Image" with the name of the report LE that is bound to your image field (the one you made invisible above).
2. Modify "C:\Sesame2\" to "C:\Sesame2\Pics\" or as needed to point to the actual location of your images, keeping in mind that your image field may, or may not, contain part of the path (e.g. "Pics\MyImage.jpg"), depending what your Image Path is set for in the Application Property Manager.
3. Adjust the size of the image in the report by modifying the value after "width". You could use "height" instead, but you should not use both at the same time. By only setting one, you will maintain the aspect ratio of the image.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Static Pictures in a Report
Reply #2 - Sep 16th, 2010 at 5:30pm
Print Post Print Post  
Great tip, Carl. Do you know if it's possible to only SHRINK down large images, without enlarging small ones? (Enlarged images look blurry).

Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Static Pictures in a Report
Reply #3 - Sep 16th, 2010 at 6:15pm
Print Post Print Post  
I'm not sure how useful this is, but CSS can do a "max" size, meaning that the image will only shrink until it is below that value and will not grow up to the value if already smaller:



May not work on all browsers (nevermind those made by MS$), but it works in Firefox.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Static Pictures in a Report
Reply #4 - Sep 16th, 2010 at 6:19pm
Print Post Print Post  
Very cool! Thanks Mark.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Static Pictures in a Report
Reply #5 - Sep 16th, 2010 at 6:19pm
Print Post Print Post  
FYI: You can use ReportHTMLFilter in your report to automatically insert the IMG style Cow shows above into the HEAD of the report.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Roland
Member
*
Offline


No personal text

Posts: 7
Joined: Jun 29th, 2004
Re: Static Pictures in a Report
Reply #6 - Sep 17th, 2010 at 7:25pm
Print Post Print Post  
Thanks @ all,
I testet the code from Carl and it worked fine.

Best, Roland
  
Back to top
 
IP Logged