cancel
Showing results for 
Search instead for 
Did you mean: 

Retain Original Image Color Depth in .NET

0 Kudos

We are using CR2020 in a .NET-application (C#). Exporting a report as PDF-document the image-quality is very poor. Searching the internet to solve the problem we found out, that setting the option "Retain Original Image Color Depth" might solve the problem. But how can this be done when using CR2020 in a .NET-application? Is there any option that we can set via code? Or ist there any way to set a key in the registry?

Thanks very much for any help!!!

Gero

DellSC
Active Contributor
0 Kudos

Is this a web application or a desktop application?

DellSC
Active Contributor
0 Kudos

I change the tag on your question to "SAP Crystal Reports, version for Visual Studio", which is the correct place for questions about the .NET SDK. The "SAP Crystal Reports" tag is for questions about report design.

-Dell

0 Kudos

The application is a web application that is implemented to provide web services that can be used to create reports in our intranet. I tried to set the option via the Crystal Reports application when logged in as a local user on the windows server but with no success. It seems that this option is set only for the local user and not for all users. The web application runs on IIS and therefore I'm not able to use a local user. So I'm still looking for a solution to set that option either for all users or - the prefered way - to set that option via code in C#.

Thanks very much for any help!

Gero

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Gero,

That option is a global value, uses it when creating a new report.

I don't see anywhere it's available in the SDK.

See if this helps...

Create a drop down list box and paste this into it:

LstInterpolationMode.Enabled = true;
Array CRinterpolationMode = Enum.GetValues(typeof(System.Drawing.Drawing2D.InterpolationMode));
foreach (object obj in CRinterpolationMode)
{
    //CRInterpolMode.GetTypeCode(CRinterpolationMode);
    LstInterpolationMode.Items.Add(obj);
}
// this is the default
LstInterpolationMode.SelectedItem = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
then in your view report routine add this:crystalReportViewer1.InterpolationMode = (System.Drawing.Drawing2D.InterpolationMode)LstInterpolationMode.SelectedIndex;
Not sure if this will affect a WEB app.

Answers (0)