Training Tips

[Skip Global Navigation]

Training

Training Home

SPSS Trainer Tip: mrInterview™ Templates

Instructor profile

Angie Schwarberg

Name: Angie Schwarberg

Home office: SPSS Cincinnati, OH

About Angie: Angie worked in the market research industry for seven years in Chicago using SPSS market research software. She has worked with SPSS as a training and education consultant since February of 2000. She has a BA from Western Illinois University and enjoys cooking and spending time with friends in her spare time.


Using mrInterview templates

mrInterview templates give you extensive flexibility in designing your survey's appearance. When you create templates for grid questions, there are two parts: an HTML file and an XML file. The XML file controls the attributes of the grid itself, such as alternating row colors, cell position, and column widths. Some users prefer to format their grid questions so that the left column is always a bit larger, to hold the question text or attributes, and the columns containing the rating scale or responses are of equal size (see Figure 1 below):

Figure 1
Figure 1

One way to achieve this is to specify each of the seven column widths individually. This, however, requires a different XML file for every grid that has a different number of columns.

You could, alternatively, specify the column width for the first column, then assign one column width in the allcells section. This would allow you to set one width for all of the cells, but override that setting for the first column, if you prefer it to be wider than the rest. The formatting for this idea is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<gridFormat xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\mrInterviewSource\mrigf.xsd">
      <tableDef>
            <borderSize>1</borderSize>
            <cellPadding>4</cellPadding>
            <cellSpacing>0</cellSpacing>
      </tableDef>
<!-This sets the first column width wider than all the cells-->
      <colWidths>
            <width>
                  <widthFormat>absolute</widthFormat>
                  <value>300</value>
            </width>
      </colWidths>

      <allCells>
            <align>center</align>
            <bgcolor>
                  <colorFormat>numeric</colorFormat>
                  <color>#ffffff</color>
            </bgcolor>

<!-This sets the width of all the columns, except the first-->
            <width>
                  <widthFormat>absolute</widthFormat>
                  <value>75</value>
            </width>
      </allCells>

      <altBodyRow>
            <bgcolor>
                  <colorFormat>numeric</colorFormat>
                  <color>D3D3D3</color>
            </bgcolor>
      </altBodyRow>
      <headRow>
            <headerCell>
            <bgcolor>
            <colorFormat>numeric</colorFormat>
            <color>#B60000</color>
            </bgcolor>
      </headerCell>
            <repeat>10</repeat>
      </headRow>
      <headCol>
      <headerCell>
      <align>left</align>
      </headerCell>
      </headCol>
</gridFormat>

By creating the XML document in this format, you can use the template from the seven-column grid above for the four-column grid below:

Figure 2
Figure 2

We offer SPSS courses at locations around the world.
Find a course in the location nearest to you.