Print Page | Close Window

BLOB-Object in CR-Viewer

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16994
Printed Date: 01 May 2025 at 2:38pm


Topic: BLOB-Object in CR-Viewer
Posted By: D.Naw
Subject: BLOB-Object in CR-Viewer
Date 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?





Replies:
Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: D.Naw
Date 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...



Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: D.Naw
Date Posted: 11 Jul 2012 at 3:00am
Thanks, I'll check that and give it a try.


Posted By: D.Naw
Date 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?


Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: D.Naw
Date Posted: 13 Jul 2012 at 3:29am
Thanks again, I'll run some tests and let you know how it turns out.


Posted By: D.Naw
Date 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.


Posted By: D.Naw
Date 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



Print Page | Close Window