Issue
Crash Magic can now access images and reports stored in a folder as of version 2.13
Explanation
A feature of Crash Magic Online is the ability to display images or reports associated with a collision from with a diagram ClickOn report. Crash Magic must be set to access the correct folder. Files must also be stored with a name that can relate to the collisions data. This will allow Crash Magic to select the correct file to display. This article covers the steps needed to set this up.
Solution
Before beginning users should make sure that any folders to be added have the correct security permissions for Crash Magic to access the files.
Adding images to the ClickOn report requires six tasks. The first task is to locate the default .options page of your .shared user. The second task is to define the image folder locations in Crash Magic. The third is to locate the calculated fields in the configuration in use. The forth is to define an expression in a calculated field for selecting the correct image. Then users will be able to select the field in their ClickOn report. The following examples will use the SampleReport images provided with the Crash Magic Online installation.
The first task is to find the Default .options information.
- Log into Crash Magic as group admin under the user group that you would like to add images to.
- Click on the + sign next to the .shared user under the user group to be changed.
- Click on the + sign next to the .options.
- Click on the Default under the .options.
- Click on the green Settings tab to display the Default .options settings.
Define the folder locations that store the images:
- With the Settings tab of the Default .options open, enter a name in the New Location Name field of the Crash Magic folder(This name is how the location will be referenced by Crash Magic. For this example we will use “SampleReports”.).
- Click on the Add button to your new folder location name.
- Change the name of Location in the folder path of the text box to the full path where your images are stored(C:Program FilesPdMagicCrashMagicOnlineAltBinProgramResourcesSamplesReports is the location of the default sample report images).
- Click the blue summary tab to save the location.
Locate the calculated fields specific for your configuration.
- Log into Crash Magic as group admin under the user group that you would like to add images to.
- Click on the + sign next to the .shared user under the user group to be changed.
- Click on the + sign next to the calculatedfields.
- Click on the U_UserSpecific calculated field.
A calculated field must be created that can determine the name of the file to be used.
- With the U_UserSpecific calculated fields selected click on the green settings tab(Pd’ Programming recommends that the Calculated field be copied to a user for editing and testing before being added to the user group. This will allow a single user to test the changes without affecting the group.).
- Click the green plus symbol to add a new calculated field.
- Enter a name in the field name box to describe the image.
- Enter an expression to call the image( Example binaryfilecontent(“SampleReports”, “Report_” + STRING(DAY(_DATE),0) + “.jpg” This example will look for reports in the defined SampleReports location using the name Report_
. jpg. This means that if you click on a collision that occurred on the 26th of the month Crash Magic will look for a file named Report_26.jpg. The calculation will need to be adjusted for the specific names of the files used. For example changing the file name of the binaryfilecontent function to _CASEID + “.jpg” will cause Crash Magic to look for a file with the name . jpg. ). - Exit Crash Magic to save the settings.
Now that the image has been defined it can be added to the ClickOn report.
- Log into the analysis side of Crash Magic Online and create or select a collision diagram that contains at least one collision graphic.
- Click on the collision graphic in the diagram.
- Click the edit field list button for the click on report.
- Select U_UserSpecific where your calculated field is created in the field list.
- Add your new field to the list of available fields.
With the new field added to the list of fields the display settings will need to be set.
- In the field list editor with the new image field selected click on the Advanced check box
- Select the image type being displayed( For the sample images that shipped with Crash Magic Online select “image/jpeg”).
- Select the encoding of the image file( For the sample images that shipped with Crash Magic Online select “Base64”).
- Select the display method for the image( For the sample images that shipped with Crash Magic Online select “LocalLinkThumbnail”. This will render a small image in the ClickOn report that users can click on and see a larger version.).
- Click the Save and return button to see the results.
Using the information supplied in this article users will be able to see the sample images that ship with the Crash Magic Online program. Users should adjust the settings to display their own images.