Administrator Guide 2017
Overview of Creating a magic5 Word Document report
Overview of process
  1. Step 1. Create a Word document skeleton
  2. Step 2. Set up data collection items in the template
  3. Step 3. Enter the unique names in the Word document
  4. Step 4. Add document to list of Word Templates
  5. Step 5. Attach the Word document to the Template
Step 1. Create a Word document skeleton
  1. Make a copy of an existing Word document or open a blank document.   Alternatively a generic unformatted document of the whole report can be created which might be useful as a starting point for creating something more sophisticated.  Click here to find out how.
           
  2. You will probably want include a static header for customer details and, maybe, fixed text (such as an explanation of terms, references, conditions, regulations, etc) followed by an area for data as collected on the device and a closing area including (for example) signatures, dates, summaries.  There may also be appendices such as supporting evidence, photographs, plans, references, etc.
  3. Check (using Print Preview) that the pagination is appropriate and that borders make things easy to read.  This will probably need to be done again later so don't spend too long on it now.
  4. Think about how the magic5 data is going to populate the skeleton.


    The example shown is for a Risk Assessment Report. 
    • The first page contains information supplied by the office such as customer and site details, and can include a customer specific image filled in by magic5 as well as your company logo as a fixed picture set up in Word.
    • This is followed by a Table of Contents which will be created using Word's reference tools.  It is linked to Heading Styles defined and used within the document - as can be seen in the example below, this example uses Heading 1 style for main ToC entries and Heading 2 for sub-items.  Word allows more levels than this and a number of ready made formats are available.
    • The footer can also be set up to contain a brief document description using magic5 variables and Word fields - the example below contains customer name and assessment date and would normally include a page number set up in Word.  It is worth noting that page numbering in Word can be made much more flexible by using Sections and starting the page number afresh with each section - this is particularly useful for Page X of Y as Y can be set to refer to a Section rather than Document count.
    • The next page contains a number of fixed items that will appear on all reports - this might be clarification of terms, regulatory text, outline of procedure, disclaimers, generic introductions, etc.
    • This is followed by the data collected on the device.  In this example the data is findings which require a special bookmark that will be explained below, but it is more often single data items and often a simple yes or no from multiple choice.
Step 2. Set up data collection items in the template
  1. If you are unsure about creating templates go to Template for help on setting one up.
  2. Enter meaningful unique names for your template items and make a note of them. These are usually located in the 'Advanced' tab of the edit box.  The example here uses 'JobNo', utilising capital letters to clarify the meaning as spaces are not allowed.  Underscores ("_") and hyphens ("-") are allowed but need careful handling when putting in Word merge fields.  Please also note that they are case sensitive so this example would not be recognised as "jobno".  However, this does not mean that JobNo, jobNo, Jobno and jobno can be used for different items as this will cause problems elsewhere - avoid them to be on the safe side.

  3. Note down the attributes and unique names that you have used for your template items, remembering that they are case sensitive.
     Some browsers will allow you to screenshot which is obviously the most efficient way to do this.

  4. In the above example, unique names are used for sections to so they can be used for formatting and repeating in the document.
Step 3. Enter the unique names in the Word document
  1. Use Word's Mail Merge field to enter template items and attributes, referring back to the unique names and attributes noted down in Step 2.  

    Merge fields can be inserted into a Word document by selecting the Insert tab then Quick Parts and choosing Field.  In the Field dialogue box, select MergeField from the Field names list on the left and type in the unique name (plus attribute name if required) as shown below.


           
  2. View more help on how report items can be added to your document using merge fields in Word.
  3. View help on special merge fields in Word.
  4. magic5 uses bookmarks in Word to create powerful formatting and options.  View help on what you can do with bookmarks.
  5. Some magic5 bookmarks (for example outputting findings) require specifically named styles to be set up.  View help on how to do this.
  6. Ensure that any requisite styles have been created.  View help on how to do this.
Step 4. Add document to list of Word Templates
  1. Word Templates should already exist as a menu item (probably under Advanced) but if not visible, use the Lists menu item to find a list called Word Templates.  View help on setting up the Word template list.
  2. If FTP uploading is being used, upload the document created above to the correct folder on the server.
    If you don't know what this means then it is irrelevant - ignore it.
           
  3. Create a list entry, giving it a meaningful name in the Text prompt.  Other items on the main List Entry tab are irrelevant here.
  4. Open the Additional Attributes tab.  Add the document and enter the button text.  View more help on this tab.
Step 5. Attach the Word document to the Template
  1. Open the parameters of the required template and select the Report tab.  Under Word template, select the list entry created in step 5 from the drop-down list. 
  2. More than one Word Template can be attached to the magic5 template and each will be initiated by a separate button at the bottom of the report screen.
See Also