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!

Need HELP Displaying BLOB Field / Attachments in Report

Status
Not open for further replies.

lesleycampbell

Technical User
Jun 21, 2013
59
US
I am trying to create a report using Crystal 2011 that will display the attachment, regardless of the type, in the report.

For instance the employee adds history notes under a customer. They can attach a file to the history note - pdf, word, excel, etc.

I want to be able to display the attachment in my report.

 
Do you have any way of knowing what type of document the attachment is when you run the report? If not, there is no way this can be done. Also, if the object is in the same field as the rest of the note, this probably can't be done. There is no way I know of to have a single OLE Object detect the type of document that it's displaying. However, if it's in its own field AND you know what type of object it is, here's what might work:

1. Create a new section for each type of attachment. For each of these new sections, turn on "Suppress if blank".
2. Go to the Insert menu and select "OLE Object".
3. Select the type of object that will go in a specific section - for example "Adobe Acrobat Document".
4. If required, select a file of same type as the OLE Object to use as a placeholder for the object.
5. Place the OLE Object in the appropriate section.
6. Right click on the object and select "Format Graphic" - Crystal terms all OLE Objects as "Graphics", even when they're not, so don't let this confuse you!
7. On the Picture tab, click on the formula button to the right of "Graphic Location". In the formula, just select the field where the object is stored.
8. On the Common tab, turn on Can Grow so that the object will resize as necessary.
9. Again, on the Common tab, click on the formula button to the right of "Suppress" (DO NOT check the Suppress checkbox!). Assuming "myTable.AttachmentType" is the field that contains info about what the type of the attachment is and we're working on the PDF object, you'll enter something like this:

IsNull({myTable.AttachmentType}) or {myTable.AttachmentType} <> "PDF"

This will suppress the object if there is no attachment or the attachment is the wrong type for this object.

-Dell


DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
I'm so excited to try this as I have been wanting the capability for some time! I will keep you posted! Thank you for the response!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top