This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help
Create a simple context-sensitive report in the crocodile survey
This describes briefly how to change the crocodile survey provided with Snap to create a simple context sensitive report .It consists of the following stages
- Stage 1: Set up a derived variable to compare all data to the current context data
- Stage 2: Create a bar chart comparing the amount spent in the specified location with the amount spent elsewhere using the comparison variable
- Stage 3: Create a comments list filtered on context
- Stage 4: Create your report including the comparison bar chart and filtered comment list
Stage 1: Set up a derived variable to compare all data to the current context data
- Click
to open the window. - Open and change its to to make it more obvious what it is. This will be used as the context variable.
- Click
on the Variables window toolbar to add a new variable. - Specify the Variable details:
Name: CComparison
Label: Compare context to all
Type: Derived (the variable will derive its data from , the existing location question).
Response: Multiple (each respondent will fall into two cases).
- Double click in the first code label and click the ] button. Select from the drop-down list.

- Select as the , and as the . This will give the selected location as the code label. Click to return to the variable definition.

- Press [Tab] to move to the column. Enter . The code used will be the code that equals the location specified by the context.
- Press [Tab] to move to the next field and enter . Then enter as the . This code will be used when the response does not equal the location specified by context.
- Press [Tab] to move to the next field and enter . Then enter as the .

- Click
to save the variable.
Stage 2: Create a bar chart comparing one restaurant to the others using the comparison variable
- Click
to display the dialog for a chart. - Select the chart style from the drop-down list.
- Type (your derived variable) into the field.
- Check the box.
- Select from the list and enter (the amount spent) as the variable to use.

- Change to the tab and click in the field.

- Enter the title of your chart, using the button to open the . dialog and insert the of and the of in the title.

- Clear the titles.
- Select the tab.
- Clear the options for and if set.
- Click to see your chart.

It will have no data for the title and subject as no context has been set.
- Click
to save your chart.
Stage 3: Create a comments list filtered on context
- Click
to create a list. The picture below shows a list consisting of the variable () with comments plus the displayed location.Apply a filter ofto filter the comments according to the current location. tests that an answer has been supplied to to strip out empty comments. filters the comments according to the selected location.

- Select the tab and clear the options for and if set.
- Click to create the new list.
It will have no content as no context has been set.
- Click
to save your list.
Stage 4: Create your report including the comparison bar chart and filtered comment list
- Click
on the Snap toolbar to open the reports window. - Click
to create a new report and give it a label describing it. - Click
on the report dialog and select to add a piece of text to your report. - Enter the title for your report in the text pane. Leave the field blank.

- Click to add the instruction to the report.
- Click
on the report dialog and select . - Click
on the dialog and select the comparison chart () from the list. - Click to add the instruction to the report.
- Click
on the report dialog and select to add text after the comparison chart. - Enter some text describing the comments list. Use to insert the of the variable to insert the label of the current location.
- Type in the field. This tests if there is currently any data in the comments list (analysis ). If there is not, the instruction will not be used in the report.

- Click to add the instruction to the report.
- Click
and select from the drop-down menu. - Select the comments list () from the list of analyses.
- Click to add the instruction to the report.

- Click
to save your report.
If you test your report in Snap by setting a context, remember to remove it before you proceed
Hide this content.