Anyone good with Cr...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Anyone good with Crystal Reports? Maintaining aspect ratio of images

9 Posts
4 Users
0 Reactions
360 Views
Posts: 0
Free Member
Topic starter
 

I've written a report that dynamically displays images for each line of data. The image location is a URL (e.g. www.myimages.com/12345.JPG) and the URL string is stored in the database I'm connecting to. So far so good, my images are displaying.

Since the images could be all sorts of different sizes I need to keep the image container static and resize the images within (again so far so good) but whilst also maintaining the aspect ratio. This last bit is the bit I'm struggling with. I know a mountain bike forum is an odd place to ask but I'm not getting my answers anywhere else so it's a last ditch attempt. I fear - judging by my Googling - it is a known weakness of Crystal, but I'm in denial.


 
Posted : 06/02/2012 1:49 pm
Posts: 0
Free Member
Topic starter
 

A hopeful *bump*


 
Posted : 06/02/2012 3:44 pm
Posts: 2
Free Member
 

dump Crystal and use PHP or even JavaScript on a internal web server?


 
Posted : 06/02/2012 3:50 pm
Posts: 0
Free Member
Topic starter
 

Assuming "dump Crystal" is not an option do you have any other ideas?


 
Posted : 06/02/2012 3:54 pm
Posts: 2
Free Member
 

Sorry. I doubt it can do it. I had an awful time with images in Crystal.

The other option is to have a load of images the right size and aspect ratio for the report.


 
Posted : 06/02/2012 3:56 pm
Posts: 0
Free Member
Topic starter
 

The other option is to have a load of images the right size and aspect ratio for the report

Sadly that is the conclusion I'm coming to, but since the image library already exists and there are 10s if not 100s of thousands if images, it could be a big job. Might need to look into software that can batch resize...

What's most annoying is that report writers I've used in the past have this function as standard 😕


 
Posted : 06/02/2012 3:59 pm
Posts: 0
Free Member
 

http://stackoverflow.com/questions/4254260/crystal-reports-image-squashed

Any use? It's only google, but its been a decade since I last touched Crystal Reports!


 
Posted : 06/02/2012 3:59 pm
Posts: 0
Free Member
Topic starter
 

Mmm, maybe. My problem is that whilst I can write simple Crystal Reports (and I count showing images as pretty simple), I'm not a developer. I'll see if the dev team at work can do something with it.

Thanks


 
Posted : 06/02/2012 4:11 pm
Posts: 0
Free Member
 

There's BLOB field which will hold an image, it's got XScaling and YScaling properties. Might be worth playing around with?


 
Posted : 06/02/2012 4:13 pm
Posts: 0
Free Member
Topic starter
 

done that. The main issue is that the x and y scaling need to be dynamic with potentially each image it comes across. I once used a report writer for Delphi called - oddly enough - Report BUilder. Whilst it was limited in some places, what I'm trying to do here was simply a case of setting a menu option to "Maintain Aspect ratio". I assumed Crystal would have something equally numpty-proof.


 
Posted : 06/02/2012 4:20 pm