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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print (.DOC, .XLS, .PPT) files in CR

Status
Not open for further replies.

IQSChris

Technical User
Nov 1, 2007
11
Issue – Trying to have documents(.doc, .xls, .ppt) print in reports. I have reviewed some related threads but most appear to involve graphics. Graphics print OK, it is the other file types that are giving me a problem.
Info:
CR XI, ODBC connection to either SS 2005 or Oracle10g.
Software application(OLTP) can save file attachments associated to a product record as embedded or linked.
Example:
Product_Table
Product_ID (Left outer join to Product_Link_Table.Product_ID)

Product_Link_Table
Product_ID
Link_ID (Left outer join to Link_Table.Link_ID)

Link_Table
Link_ID
File_Location(shows file name and extension or file path)
Embed_File
Link_Type (Embedded or Linked)

I can insert an OLE object via Insert > OLE Object. However, I am trying to print out product characteristics from the DB along with file attachments associated to the specific product. Each product can have 1:M unique file attachments.
.TIF, .JPG, and .BMP file attachments print. .TXT, .RTF, .DOC, .XLS do not print.

Any help would be greatly appreciated.

Thank You,
(This is my first thread, please bear with me)
Chris
 
My findings related to CR XI:
1. You can utilize Object Linking and Embedding (OLE) to print a document (.doc, .xls, .ppt, other) within a Crystal Report(CR). So, the statement that CR can print these types of documents within a report is technically a true statement. However, this method requires a report author to select a file in a specific location using the menu option Insert > OLE Object. This is not linked or related to pulling a DB field.


2. Database fields will display if they are graphic and embedded such as .jpg, .bmp, and .tif. CR will not display documents without the addition of a third party tool.


3. A hyperlink can be displayed for linked documents that allow a user to launch that document. This will not allow the document to print within the CR, but it will allow a person to launch an application that displays the document.

Linked documents could possibly be printed in CR, but something like the following would need to be utilized:

1. Documents may need to be in .txt, .rtf, or .html format.
2. A third party software tool would need to be purchased to interpret the file(approx $200). I don't know how this would interface with Crystal Runtime.
 
1. You can use a common file name for the linked OLE object, which the common file gets stored in the rpt folder or sub folder of it. Then store the actual file location and names of the files to link to, in a db table or what ever.
Prior to opening the report, copy the file(s) to the rpt folder using the common name.
As long as the file types are the same as the linked OLE object, it should work.

2. True. That is the linking part of OLE and the way it always works. If not coverted and embedded, you need a program which can show the file, and where the file type is linked to it, on the system which is showing the rpt.

One all-round solution would be to get a third party PDF converter (a PDF "printer"), and save the docs, xls, etc files to PDF format. The common PDF file name mentioned in #1 would then be used.
 
You wrote:
-----------------------
1. Documents may need to be in .txt, .rtf, or .html format.
2. A third party software tool would need to be purchased to interpret the file(approx $200). I don't know how this would interface with Crystal Runtime.
-----------------------

You can create your own UFL or purchase an existing one that would allow you to read txt, rtf, or html files into a formula inside Crystal. You then turn on the formatting option within Crystal to interpret the imported text as rtf or html, as needed.

For a list of 3rd-party tools, including UFLs, see
One option I'm aware of costs $50.

Note: Crystal has some limitations on what rtf & html features it can render.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thank you SBerthold and IdoMillet for your replies.
Bottom line...it appears that a third party software is required to interpret text/html/pdf from a DB. For our application, Crystal Runtime is invoked and launches the reports. Our users typically do not have the CR application. Adding a third party software certainly complicates this process for us. The problem is that BO claims that they can display such documents which in turn causes management to request the documents to be displayed - this claim is somewhat misleading and oversimplified.
 
If the txt, rtf, or HTML content can be made available to the report directly (as text), then there's no need for 3rd-party tools.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Hello Ido,
I don't understand what you mean. I have placed the link_embed file in my detail line on the report. The only files that produce output are .jpg, .bmp, and .tif. Files such as .rtf, .txt, .doc, .htm do not produce output...they are blank. In my DB/application, I can link/embed multiple files to a record. The only link/embed files that produce output are graphic(.jpg, .bmp, .tif). Can you help me to understand how to output text file contents within a report...not using OLE? In other words, by dragging a DB field onto the report canvas, the graphic files produce output, the text files are blank.
Thank you for your help!
Chris
 
Based on my knowledge, which is limited, the convert/cast function changes the data type of a field from one type to another. Like changing a numeric type to a text type. The embedded data in the DB file is stored as an image type. I'm afraid we would lose the formatting of the files if we rendered in only text. Some people link a flowchart .ppt, some may link a visio chart, and perhaps graphs from .xls. It is strange that I can place one of these types of files in a report and it will print out fine using Insert > OLE Object. But I can't link these types of files from a DB and print them...very frustrating.
Ido, I do appreciate you taking time to review.
Thanks again, Chris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top