Relative path for images
We have seen some recipes in this book where we displayed images on the report (for example, Traffic Signal one). This recipe will show a best practice related to that.
Getting ready
We will use the report created for last recipe for this one.
How to do it...
Open the report in Cognos Report Studio. From Insertable Objects | Source pane, drag the Product image on list as a new column.
Run the report to test it.
It is possible that the images are not displayed.
In that case, log on to the server and make sure the GO Sales sample images are located in the
{installation
folder}\webcontent\samples\images
folder. If not, put them there from the sample provided with this book.After putting the images in the correct folder, run the report and they should display correctly.
Now go back to Cognos Report Studio. Double-click on the Product image column. This will open the data expression window.
Browse the model tree from left to locate Product image column. Now click on the Select...