[Last Call] Learn how to a build a cloud-first strategyRegister Now


Adding OLE file object's location and content  at run-time in crystal report

Posted on 2012-09-17
Medium Priority
Last Modified: 2013-02-22

1)In my report I need to display the content of a file(could be any format) within crystal report. The location of a file is coming from database field. How can that be achieved?

2)Also while I was testing by putting an OLE object and linking it to a file, but when I previewed it  report is going blank. Need help on this also.
Question by:NoorFaz
LVL 101

Assisted Solution

mlmcc earned 1328 total points
ID: 38405872
What version of Crystal?

In CR XI, 2008, and 2011 you can link an OLE object to a file through a formula

INsert the OLE Object
Right click it
   Click the formula button to the right of Graphic Location
    Select the field from the list

LVL 35

Expert Comment

ID: 38408365
When you say "could be any format", do you mean graphic formats (JPG, BMP, etc.) or any format at all (BMP, DOC, XLS, XLSX, etc.)?

 Either way, I think older versions of CR only supported a limited number of file types.  I don't know about the newer versions.  So "any format" may not be possible, at least with the standard CR.

LVL 101

Expert Comment

ID: 38409499
The formula for a grphic is limited to graphic files (no doc, xls, etc) and may even be limited to specific graphic formats.

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.


Author Comment

ID: 38409546
Thanks guys for the help. I'm at crystal XI, I have to display the contents of basically text files, could be doc,txt,docx etc. How can I get the text from those files and display it on crystal report.
LVL 101

Assisted Solution

mlmcc earned 1328 total points
ID: 38410639
You can use an OLE objetc but it can't be changed at runtime and it will only display page 1

I believe Visual Cut from Millet Software can help


Accepted Solution

nicde earned 672 total points
ID: 38415563
I will be curious to know how Visual Cut can do this. We had a similar project a while ago. We were advised to buy this software but it didn't work for us.

We found 2 other ways to handle this :
1 . Initially we were able to resolve the issue by converting the word files to tiffs - each page in a separate tiff file. Then we added a picture in  the report details section and pointed the source to the right tiff file. We had to create a "links" table to maintain the links between the original word files and tiff files so the report was able to get all pictures and place them in a detail section OLE object. This was working fine at the beginning , but became a big burden with the number of files growing too much. The other problem was that because of the pictures the pdf files exported from crystal reports were too big and we had issues with the backups.

2. We found a free tool which was able to join multiple crystal reports and PDF files and to create one combined pdf file. We had to divide the report to multiple reports because it is not possible to insert the pdf in the middle of the report and the way it works now is :
  run report 1
  add one (ore more) pdf files
  run report 2
  add one (ore more) pdf files
  run report N
  add one (ore more) pdf files

In the past report 1, 2 ... N  were one big report , but since we were not able to insert the pdf files we had to separate the main rapport in pieces. The solution still has some restrictions - par example we can add just a complète page , but it is way better than the other one because the result is a pdf ( with normal size) and there is almost no maintenance - we are just adding/replacing files when this is necessary without converting everything to tiffs

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question