Hi Jimmy,
CR is a 32 bit app so it won't be able to handle an image in x64 format unless you find a way to convert it to x86 type.
The MS SQL client may be able to do this for you though. Install the SQL Native 10 client from the MS SQL Tools menu options and then convert/update the report and DSN to use the SQLNCLI10.dll as the client dll.
See if you can add that field to the report, if that works then you can add any image to the report and set the image formula to that database field using the Formula field:
click the X-2 button for graphic location and select the field with the image in it.
Now preview, if the Client converts 64 to 32 bit then this should work for you, if not then only option is as Dell pointed out and save the image to the HD in BMP or JPG format and then you can use the same Graphic Location formula to point to the folder and file location.
To update it in code it would look like this in the KBase article:
2021348 - Modifying a Picture object in .NET ignores Object.Height and Object.Width when setting Condition Formula Can Grow is enabled
Symptom
When modifying an existing picture object and using a formula to update the image file location and name using the .Modify() method the image is not sizing accordingly.
Environment
Crystal Reports for Visual Studio
VS 2010
VS 2012
VS 2013
Resolution
You can do this all dynamically and creatively as you wish but the basics to updating the image is as follows:
CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject boPictureObject = new CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject(); ;
string strNewImageFilename = "D:\\Atest\\DSC_2655.jpg";
foreach (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject oReportObject in objects)
{
if (oReportObject.Kind == CrystalDecisions.ReportAppServer.ReportDefModel.CrReportObjectKindEnum.crReportObjectKindPicture)
{
var oPlaceholderPicture = oReportObject as CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject;
if (oPlaceholderPicture != null)
{
// clone the original object so it can be modified
var oNewPicture = (CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject)oPlaceholderPicture.Clone(true);
var cf = new CrystalDecisions.ReportAppServer.ReportDefModel.ConditionFormula();
PicFileLocationFormula.Text = "\"" + strNewImageFilename + "\"";
oNewPicture.Format.EnableCanGrow = false;
oNewPicture.GraphicLocationFormula = PicFileLocationFormula;
oNewPicture.Width = 4320; // 3 inches
oNewPicture.Height = 1440; // 1 inch
rptClientDoc.ReportDefController.ReportObjectController.Modify( oPlaceholderPicture, oNewPicture );
// Call the Modify again to update the CanGrow flag to false - default is set to True
oNewPicture.Format.EnableCanGrow = false;
rptClientDoc.ReportDefController.ReportObjectController.Modify(oPlaceholderPicture, oNewPicture);
}
}
}
This issue has been tracked with ADAPT01727457 and scheduled for SP 11 ( possibly SP 10 )
In the mean time use the above work around
Don