This worksheet describes how to insert data from a table cell in your report. The example used is inserting a filtered base.

The default Summary Report displays some text showing the number of overall cases and describing the applied filter. If you apply a filter you may wish to include the new respondent base in the report. You can achieve this by inserting a cell reference.

You can insert the value from any table cell into an Information instruction by using a Cell Value field. This puts a reference to the cell in your report. When you run the report, the reference is replaced by the current cell value. If you apply a filter to the report, the filter will also be applied to the table that the inserted value is from.

If you insert a reference to the base value of a saved table in your report, you will automatically get the filtered base when you filter the report.

Background

Cell references are a means of inserting automatically updated data in a report (or in the notes for an analysis). A cell reference is the position in the specified table of where the data is shown.

The cell referred to can be:

  • A row label (describe by tablename RN label e.g. AN1 R1 label
  • A column label (describe by tablename CN label e.g AN1 C1 label)
  • A data cell described by its row and column number (describe by tablename RNCN e.g AN1 R1C1)
  • A statistic value described by its row and statistic number (where its statistic number is its position in the list of statistics, S1 being the top, given by tablename RNSN e.g. AN1 R1S1)

where N is replaced by the row or column number.

Once you have inserted the cell reference into the report, any filters applied to the whole report are applied to the table that the referenced cell is part of.

You can use any analysis as the basis for the reference. For example, if you wish to insert a reference to data in a chart, view the chart as a table to find out what the cell reference is, and then redisplay it as a chart.

Summary of steps

Step 1: Creating the analysis containing the cell to reference
Step 2: Inserting the reference in your report
Step 3: Applying the filter

Step 1: Creating the analysis containing the cell to reference

You can use any analysis to provide the filtered base. For this worksheet, you will create a simple table to provide the cell reference.

    1. Click table on the toolbar to create a table.
    2. The Analysis Definition dialog will open.
    3. Enter a question that all respondents answer in the analysis field (the example uses Q1).

If you do not use a Must Answer question, ensure all respondents are included in the Base value by selecting the Base/Labels tab and setting the Errors, Not Asked and No Reply fields to Hide instead of Exclude.

The example shows the Available field set to No. If you are only using an analysis to provide a cell reference, you would not want it to be available to view on Snap WebHost.

Results definition dialog: definition tab

  1. Click [OK] to create the table then click Save button to save it.

    Smart reporting: image of grid table

  2. The Base value is displayed in the first column.
  3. Click on the base value. Right click and select ‘Copy Cell Reference’. In this example, the reference will be the table name, followed by a space and R0C1 (row 0, column 1).
    (You can click in other cells to see their references.)

Step 2: Inserting the reference in your report

  1. Click Batches button on the Snap toolbar to open the Reports window.
  2. Select the Summary report and click Clone button to make a copy of it. This will ensure that you can go back to the original if you make any mistakes.
  3. Close the copy and open the Summary report.
    REP: Default questioninaire report
  4. Double-click the Information instruction to open it. The default text is:

    {Title}

    This report was generated on {date}, giving the results for  {cases} respondents.

    A filter of ‘{filter}’ has been applied to the data.

  5. Change the last sentence to read The report has been filtered to show the responses for ‘{filter}’ ( cases).
  6. Place the cursor after the open bracket, click the [Insert] button and select Cell Values Field… from the options.
  7. The New Cell Values dialog opens. Enter the Cell Reference for the Base cell in your table. Remember to leave a space between the table name and the cell position (e.g. AN15 R0C1).
  8. Click [OK] to insert the field.
    Printer layout dialog with start new document highlighted
  9. Click [OK] to save your changes.

Step 3: Applying the filter

  1. Add the filter to the Filter field at the top of the report window. For example, using the demographic question Q10. Are you male or female?
    Inserting background picture in title
    Enter Q10=2 in the Filter field to create a report using only the data from women.

    REP: Default questioninaire report

  2. Click the Play/run button  button on the report window toolbar to run the report.
    The data that you have referenced will be filtered, so that when you run the report, you will see the correct filtered base value.

    This report was generated on 02/06/14. Giving the results for 204 respondents.

    A filter of ‘Gender=Female’ (59 cases) has been applied to the data.

If you are content with the new version of the report, delete the clone back-up.

Conclusion

This worksheet has described how to use a reference to a table cell to insert a filtered base in your standard Summary Report.

To find out more about using references to cells, see the help topic: Inserting the content of a table cell.

For instructions about inserting references to ordered tables, see the worksheet: Creating a smart report which includes automatic text and the help topic: Inserting dynamic data from a ranked table to put highest and lowest values in your report.

For further information about the Summary Report, see the help topic: Changing the default reports supplied with Snap and the worksheet: Adapting the automatic Summary Report (WS:106).

If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com