Importing Text from a File


If you have large amounts of text that you want to use in Crystal Reports text objects, you may either type it into a text object directly or copy and paste from the Windows Clipboard. However, data for text objects can also be imported directly from plain text, Rich Text Format (RTF), or Hypertext Markup Language (HTML) files.

To import text into a text object, add a text object as described previously in the chapter (using the Insert menu or toolbar button). If the text object isn t already in edit mode, double-click it to place it in edit mode. Then, right-click and choose Insert from File from the pop-up menu.

A File Open dialog box will appear. Navigate to the drive and folder where the text, RTF, or HTML file is that you wish to import into the text object. Choose the desired file and click OK. The file will be imported into the text object, alongside any existing text that may already be in the text object. If the text file contains plain text, it will simply be displayed in the text object in the default font style for text objects (set on the Fonts tab of File Options). If the imported text is in HTML or RTF format, Crystal Reports automatically interprets the embedded font and formatting specifications and includes them in the text object. If you wish to reformat portions of the text object, simply use techniques described previously in the chapter for formatting individual parts of text objects.

click to expand



Crystal Reports 10
Crystal Reports 10: The Complete Reference
ISBN: B005DI80VA
EAN: N/A
Year: 2004
Pages: 223
Authors: George Peck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net