Creating Reports with Images in Crystal XI

Creating Reports with Images in Crystal XI Tech Tip Release Date: Created: Last Revision: Crystal Reports version: August 2006 August 29, 2006 August...
Author: Diana Blake
3 downloads 0 Views 295KB Size
Creating Reports with Images in Crystal XI Tech Tip Release Date: Created: Last Revision: Crystal Reports version:

August 2006 August 29, 2006 August 29, 2006 XI (Developer and Professional)

Contents • • • •

Add a Logo Adding Images to Items: Tables and Links Adding Images to Items: Importing the Image Hints and Tips

After installing and playing with Crystal Reports XI, many museums are taking the next step of adding images next to the data of items featured in reports. Almost any report can be improved by adding an image for each item on the page, ranging from shelf-lists to exhibition checklists to condition reports to end-of-year acquisition summaries. The August MIMSY XG/Crystal Reports XI Tech Tips explain how to add images to your reports.

Add a Logo Some reports require that a static image or logo appear at the top of the first page. This gives the report the appearance of letterhead, and also identifies the report as being from a specific institution. Adding your museum's logo to a report is often necessary, especially when producing Gift Agreements and Loan Agreements. Follow these steps to add a logo to your report: In your report's Design View, choose Insert, Picture... from the menu.

In the window that appears, browse until you find the location of your logo. Click on the image file and press the "Open" button.

An orange box will attach itself to your mouse pointer. Click where you would like the upper-left corner of the image to appear in the Report Header.

Preview the report.

You may reposition the newly placed image by clicking and dragging it in either the Design or Preview window.

Adding Images to Items: Tables and Links When you have your report roughly the way you want it, it is time to consider adding one or more images per each item featured in the report. To do this, you will need to add additional tables and links to the report: Step 1: Add your image tables. This can be done from within the report by choosing Database, Database Expert from the menu. You can also choose the imaging tables in advance as soon as you begin building the report. Be sure to add the Items_Media and Media tables. The example below also includes the Catalogue table. (NOTE: You can also have images associated with other Authorities – and Activities – not just catalogued items. See the Hints and Tips section below.)

Step2: Add your table links. Click on the “Links” tab in the Database Expert window.

Press the “Clear Links” button to erase the links Crystal adds on its own. (NOTE: To avoid this step, you can change the report options in Crystal by choosing File, Options from the menu. Click on the “Database” tab. Untick the box for “Automatic Smart Linking”.)

Link the Catalogue table to the Items_Media table by clicking on the “Mkey” field in the Catalogue list and then dragging it on top of the “Mkey” field in the Items_Media list.

Link Items_Media to Media on the “Mediakey” field.

Adding Images to Items: Importing the Image Once your media tables have been added and linked together, you can then insert a picture window into your report’s Design View. Choose Insert, OLE Object… from the menu.

Your mouse pointer will turn into an hourglass attached to a small box. Position the box on-screen where you would like the picture to display. (NOTE: You can either resize the report section where the picture is to appear, or Crystal will resize the section for you).

Once the picture box is placed, it looks like this:

Step 4: Insert actual images into the picture window. Click outside the picture window and then click within the picture window. Notice the change:

Right-click in the picture window and choose “Format Graphic…” from the menu that appears.

Choose the “Bitmap Image” entry in the Insert Object window even if your image is a JPEG, TIFF, or something else. Click “OK” to proceed.

Click the “Picture” tab in the Format Editor that opens.

Near the bottom of this window, press the button to the right of "Graphic Location".

The Formula Workshop opens. Click on the “+” next to your data source.

Click on the “+” next to the Media table.

Double-click on the Locator field to make it carry down to the whitespace below the field list in the Formula Workshop.

Click immediately after the field name that appears in the whitespace and type a “+”. Double-click on the Media_ID field.

Click the “Save and close” button to close the Formula Workshop.

Step 5: Preview the report.

Hints and Tips HINT: To limit only one image per item in your report, add selection criteria in the Select Expert so that the Thumbnail field is equal to “Y”. HINT: If your images are roughly the same size, their aspect ratios will be preserved. If your images are not standardized, then make sure that the “Can Grow” box in the Format Graphic window is unticked).

HINT: If you run your report and no image appears (but you know for a fact that an image is linked to the item), check to see if MIMSY XG is open. If you have the same record and image open in MIMSY at the same time you are running a report on that item, the image will not appear in the report. HINT: Do you want to produce images that are linked to areas outside of the Objects Authority? Instead of using the Items_Media and Catalogue tables, use tables like Exhibitions and Exhibitions_Media to display an overall installation photograph of an exhibit. Link Exhibitions to Exhibitions_Media on the Ekey, and Exhibitions_Media to Media on the Mediakey. You can do similar links for Loans, People, Publications, and more! Just look for the related Media tables and link them to Media on the Mediakey. TIP: If your computer crashes while running a report that is to display one or more images, this may be a memory issue. Make sure the PC running the report has at least 256 MB of RAM. TIP: For users of Crystal Reports versions 7 - 10, you will need to verify that your images are on the same server as your MIMSY data. Instead of using the OLE Object option as described above, you will need to include the ReportImages View to your report, linking it to the Catalogue on the Mkey. You will still need to create a formula field as explained above to concatenate the Locator and Media ID fields which will ultimately display as an image in the report. The easiest way to report on an image is to upgrade to Crystal Reports XI.

Need Help? Contact the Willoughby Help Desk at 847.733.3830 or write [email protected] if you need help with anything MIMSY-related. Documentation in electronic format (including manuals and back-issues of Tech Tips) can be found in the Client Support section of www.willo.com. Revision Notes: First written: August 29, 2006. Revised: August 29, 2006

Suggest Documents