Renaming image objects

Sunday 22 January 2017 @ 12:50 pm

This was the first time I found a practical use for renaming a report object, a feature that has been available since 2002.

Every object placed on a report is given a unique “object name”. These names appear in the Report Explorer (View > Report Explorer) which lists all of the objects and where they are placed. The default object name for fields is the name of the field with a number after it. The number makes each object name unique, since the same field can be placed on the report multiple times. Graphic objects are also given object names. For instance, a series of lines would have the default names of Line1, Line2, etc.

In a report I did last week I needed to show the status of each transaction by displaying a small image that represented each status. This required stacking several images in the same place and suppressing most of them so that only one was visible at a time. The challenge was that once the images were stacked it was very difficult to determine if the correct one was selected. All the object names were Picture1, Picture2, etc.

Fortunately, you are allowed to modify the object name, as long as it is unique. To rename an object you right-click on the object, select “Format Object” and go to the common tab. The object name is at the top.  I renamed each image with the status it represented. Now when I select an object in the Report Explorer I know which one it is and can apply the correct suppress condition.

Notes:
1) Lines and boxes do not have a common tab, so there is no way to change the object names.
2) The Report Explorer was introduced with version 9 and that is the first version that allowed us to view and edit object names. If you open a report from CRv8 or older the object names will be more generic (Field1, Field2, etc). However if you copy and paste one of these objects while in a later version the newly created object will be named like current objects.









Leave a Reply

Jeff-Net
Recrystallize Pro

Crystal Reports Server