Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: BLOB-Object in CR-Viewer Post Reply Post New Topic
Author Message
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Topic: BLOB-Object in CR-Viewer
    Posted: 09 Jul 2012 at 11:17pm
We are using CR to generate reports in our CRM/ERP-software. (Visual-Studio 2012/.NET 2.5).

One of these reports displays images stored in a filestream in a SQL-Server 2008-R2-DB. In CR-preview everything looks fine.
Our software uses the CR 2008-SP3-Runtime to power the CR-viewer, here the image is somehow altered, areas of similar color being merged and thereby reducing the quality of the image.

Is there a way to display the image in its original quality over the CR-viewer in our software?
Is there a special image format that should be used?


IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 10 Jul 2012 at 7:18am
I have had good success with .jpg formatted images.  How does the image look if you print the report from the viewer?  Sometime images that don't look correct in the viewer will print correctly - it has something to do with how the viewer renders the image.
 
-Dell
IP IP Logged
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Posted: 10 Jul 2012 at 9:30pm
I have tried .jpg, .tif, .bmp, .gif and various others. The printed result from the viewer looks as bad as the image displayed in the viewer. PDFs generated from the viewer are of the same low quality aswell.

Is there a way to influence the way the viewer renders the image?
CR seems to be capable of rendering the image in the correct form, since the report-preview in CR-2011 shows the image correctly...

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 11 Jul 2012 at 2:28am
I haven't played much with Crystal 2011, but it sounds like they may have done something to the code that renders the images.  I've had this working in Crystal 8.5, XI, and 2008 with no problems.
 
Do you have an option to use an ActiveX version of the viewer?  In the past that has always rendered a report more like it is from the Crystal designer than the html version of the viewer.  You may have an option in Visual Studio on the viewer component to set it to use ActiveX (it was there in earlier versions of VS).
 
-Dell
IP IP Logged
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Posted: 11 Jul 2012 at 3:00am
Thanks, I'll check that and give it a try.
IP IP Logged
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Posted: 12 Jul 2012 at 11:29pm
Unfortunately that didn't help.
Our viewer component already uses ActiveX. We couldn't find any options regarding the CR-viewer-component in VS.

Any other ideas?
Could storing the images in a filestream be the origin of these Problems?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 13 Jul 2012 at 3:15am
Possibly.  You could test this by having your report load images from files instead of from the database.  To do this, place an Image on your report - you'll have to selece a default image file.  Then right-click on the image and select "Format Graphic".  Go to the Picture tab and there should be a formula button in the middle of the screen where you can set the image location to dynamically chose where the image is loaded from.
 
Run this report.  If the images in this version are clear, then the problem is how you are storing the images in the database.
 
-Dell
IP IP Logged
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Posted: 13 Jul 2012 at 3:29am
Thanks again, I'll run some tests and let you know how it turns out.
IP IP Logged
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Posted: 16 Jul 2012 at 2:16am
I tried loading the files directly (without storing them in a filestream in the DB). The result is still as bad as it was before, I could detect no change at all...Unhappy

That definitely clears the filestream/DB as source of the problem. It must really be the runtime/viewer component and since we don't seem to be able to influence that...

If you have any ideas left I'll sure try them out Smile.
IP IP Logged
D.Naw
Newbie
Newbie


Joined: 09 Jul 2012
Online Status: Offline
Posts: 7
Quote D.Naw Replybullet Posted: 18 Jul 2012 at 2:48am
I found a solution:

Checking the option "Retain image color depth" in the report via CR 2011 didn't have any effect.

Opening the report in VS and checking the same option under the CR-menu in VS, then saving the report solved the problem.

I have absolutely no idea why this should be the case, but it works...Smile
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.