How to add images or reports from a folder to the Crash Magic Online ClickOn report

How to add images or reports from a folder to the Crash Magic Online ClickOn report

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.

  1. Log into Crash Magic as group admin under the user group that you would like to add images to.
  2. Click on the + sign next to the .shared user under the user group to be changed.
  3. Click on the + sign next to the .options.
  4. Click on the Default under the .options.
  5. Click on the green Settings tab to display the Default .options settings. 

Define the folder locations that store the images:

  1. 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”.).
  2. Click on the Add button to your new folder location name.
  3. 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).
  4. Click the blue summary tab to save the location.

Locate the calculated fields specific for your configuration.

  1. Log into Crash Magic as group admin under the user group that you would like to add images to.
  2. Click on the + sign next to the .shared user under the user group to be changed.
  3. Click on the + sign next to the calculatedfields.
  4. Click on the U_UserSpecific calculated field.

A calculated field must be created that can determine the name of the file to be used.

  1. 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.).
  2. Click the green plus symbol to add a new calculated field.
  3. Enter a name in the field name box to describe the image.
  4. 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. ).
  5. Exit Crash Magic to save the settings.

Now that the image has been defined it can be added to the ClickOn report.

  1. Log into the analysis side of Crash Magic Online and create or select a collision diagram that contains at least one collision graphic.
  2. Click on the collision graphic in the diagram.
  3. Click the edit field list button for the click on report.
  4. Select U_UserSpecific where your calculated field is created in the field list.
  5. 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.

  1. In the field list editor with the new image field selected click on the Advanced check box
  2. Select the image type being displayed( For the sample images that shipped with Crash Magic Online select “image/jpeg”).
  3. Select the encoding of the image file( For the sample images that shipped with Crash Magic Online select “Base64”).
  4. 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.).
  5. 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.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
How Can We Improve This Article?