Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress OLE Object

Status
Not open for further replies.

puppygirl3939

Technical User
Sep 15, 2003
21
US
I am using an OLE object in a crstal report to display contact photos. These photos are located in a folder on our shared directory. The photo is named the exact way it is named in our database. If it finds a match it displays the photo but when it does not find a match crystal reports automatically displays inside of the OLE object the words "no image available". How can I suppress the OLE object when it can't find a matching image.

I am using the Graphic Location option of the OLE object

"\\shared\Consultants\ConsultantPhotos\"+{CampaignMember.Contact_Name__c}+" "+"Picture.jpg"

I even tried placing the photo in a separate section and using the suppress blank section under section formatting and that did not work.

 
I don't think you'll be able to suppress it because Crystal doesn't expose the ability to check whether a file exists. However, you might try creating a default image that is just a white square. Then delete your existing OLE Object from the report. Insert an Picture (not an OLE Object) in its place that points to this "default" image. Then format the picture and set the "Graphic Location" formula to point to the file in the same way that your current OLE Object does.

I think this will cause the blank default picture to appear instead of the "No Image Found" when there isn't an image file.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top