Tailoring reports
This worksheet tells you how to set up analyses when you are creating reports using a batch. It explains the difference between how the analyses are defined inside the batch and how they are defined on their own.
It uses the crocodile survey supplied with Snap to show you how to create a report using existing analyses. It demonstrates how to use a Window Size instruction to set the size of charts, and how to proof your report by sending it to a pdf printer.
Background
When you create an analysis, you define what data you are using (which questions you are analysing), what calculations you do on the data, and how it is displayed. The way it is displayed is controlled differently for map controls, tables and charts (lists are controlled in the same way as tables).
- Tables consist of cells which have text and numbers written into them. The text and numbers are defined in the Results Definition dialog. The way the cells are drawn is defined in the table style. This covers background colours, fonts, line widths et cetera. The table style does not change the text and values displayed.
- Charts are images representing the analysis. The way the image looks is defined by the chart style and the size of the window that it is drawn in. The data that is used to draw the image (for example, the size of the slices of a pie chart) is taken from the Results Definition dialog, but all the information that appears on the image is specified in the Chart Designer. This means that you can change text in the Chart Designer, for example, changing a label so that it fits on an axis. Changes made in the Chart Designer overrule the information in the Results Definition dialog.
- Map Controls are a combination of a fixed image and a colour overlay calculated from the data provided through the Results Definition dialog. Text and numbers displayed are created in the Map Control Editor and stored in the Map Control style file.
This means that settings in the Results Definition dialog always apply to tables, but they can be overridden by settings in the style files for charts and Map Controls.
The Results Definition is in two sections:
- the Definition and the Titles/Notes tab: these are specific to a particular analysis. They define the data that is used to create the analysis.
- all the other tabs: these are tailoring tabs. They are used to specify how the analysis is created and displayed. You can set default values for all these tabs via the Tailor >Analysis command.
When an analysis is added to a batch, its Results Definition is stripped down to the Definition and the Notes/Titles details. Everything else is controlled by the batch via Tailor Analysis instructions.
When you add an analysis to a batch, you can add it in three ways:
- By putting it in an Execute instruction. This keeps all the information in the Results Definition for that analysis. The analysis will be created the same way in or out of the batch. This is available in versions of Snap from 10.13 onwards as a simple way to insert analyses that you have already created.
- With a specific Tailor Analysis instruction before the analysis. (This is created automatically if you hold down the [Shift] key when you drag an analysis into the batch). You would do this if you wanted to create multiple tables with a single break. This is covered in the worksheet Creating reports using instructions
- On its own. It will use the information in the previous Tailor Analysis instruction in the batch. This is the way to do it if you are analyzing several questions using different breaks. Note that if there is no Tailor Analysis instruction in the batch, it will use the default settings from the Tailor>Analysis command.
If you wish to use analyses that you have already created outside the batch, the simplest method is to place them in Execute instructions. This ensures that the tailoring always stays with the analysis. The other options are available for people who wish to create many similar tables very quickly.
Controlling the look of charts
Charts are drawn to fit the window that they appear in. If a chart includes many items, they will be drawn smaller than a chart with few, and the fonts used for the text will be scaled.
The size of charts created in a batch is controlled by a Window Size instruction.

The default window size is Standard. This creates your chart as a rectangle with approximately the same shape (height-width ratio) as an A4 page.

When you create a paper report, the chart will be scaled to fit the paper size (and column width) you specify. It still keeps the same shape.

If your chart is a different shape to the standard proportions, you can create a custom rectangle by using the Customized option in the Window Size dialog.
Summary of steps
This worksheet describes how to tailor your analyses in a report. It assumes that you are using an unchanged version of the snCrocodile survey supplied with Snap, together with its data.
You will need a pdf printer driver to proof your results, for example PDF Creator. (This is open source free software available from http://www.pdfforge.org. Snap Surveys Ltd does not provide support for any third-party software, but if you have a problem creating your reports using a pdf driver, please contact support@snapsurveys.com)
Step 3: Using a window size instruction to change the size of the chart
Step 1: Defining your report
- This report will create two tables and a chart.
- Open the snCrocodile survey.
- Click
to display the Batches window. This is where you create reports.

- Click
to create a new batch where you put the analyses that you are going to use in the report. A named Batch window opens with a single Tailor Analysis instruction in it.

- The Tailor Analysis instruction sets the defaults for all the analyses which follow it. Double-click it to open it, then go to the Summary Statistics tab.

There are no extra summary statistics included by default. There are also no descriptive statistics included. If you simply drag tables that include any of these statistics into the batch, they will not be shown in the report.
- Click
on the Snap toolbar to open the list of analyses supplied with snCrocodile. The analyses include tables with means and medians.

- To ensure that the means and medians remain with the tables when they are used in the batch, put them in an Execute instruction. Click
on the Batch window toolbar and select Execute.

- Select AN3 from the dropdown list as the Name of the item to execute in the Execute dialog.

Leave the Instructions blank and click [OK].
- Repeat for AN4.
- Click
on the Batch window toolbar and select Window Size. The Window Size dialog opens.

- Click [OK] to leave it at the standard size.
- Add another Execute instruction and set the Name to be AN11 (a bar chart).
Your batch should now look like this.

This will create the two tables (exactly the way they were defined), set the height-width ratio for a chart, and then create the bar chart.
Step 2: Proofing your report
If your default printer is not a pdf printer driver, you first need to select the pdf printer driver.
- Select Printer Setup from the File menu on the main Snap window.
- Select the pdf printer in the Print Setup dialog.
You can now create a pdf of the report.
- With your batch open, click
in the toolbar of the Batch window to open the Batch Execution dialog. (If you have not saved the batch, you will be asked to save it). - Leave the Range of instructions box blank, as you want to use all the instructions.
Set the Output as Printer

- Clear the Contact Sheet box.
- Select Continuous. (Separate pages places each analysis on a separate page).
- Click [OK] to produce your report. It will look something like this. The frequency tables follow one another.

Step 3: Changing the size and position of the chart
This shows you how to change the shape of the bar chart. If you change the order of the instructions in your batch, you must make sure that the relevant Window Size instructions always appear before the charts that it applies to.
- Go to the Results list.

- Double click the AN11 analysis to open it.
- Change the shape to make it a short wide window.
- In the Batch window, drag the Execute instruction for AN4 down to the end of the list. As you drag the pointer changes between
(insert before the current instruction) and
(insert the new analysis after this instruction). Ensure that it is
when you drop the Execute instruction.Your batch window will now look like this

- Double click the Window Size instruction to open it.
- Change the setting to Custom...
- Click [Set Custom]. This opens a window that will be the same shape as the printed chart.
- Resize the window until it is approximately the shape of the window displaying the AN11 bar chart.
- Click
to save the custom window shape. - Click [OK] to save your Window Size settings.
- Click
to open the Batch Execution dialog (you will be prompted to save the batch). - Click [OK] to produce a proof of the new version of your report. It will look something like this. The bar chart is now in between the frequency tables. The shape of the bar chart has changed according to your window size instruction.

Running a limited set of instructions
You can also proof a limited set of instructions in your batch by typing the instruction numbers in the Range of instructions field in the Batch Execution dialog. For example, entering 8 to 15 will cause the batch to just run instructions 8 to 15. If you enter 4, 7, 9 to 10, it will run those instructions in that order.
If you want to test part of your batch that includes a chart, you need to make sure that you include any associated Window Size instructions. If you create a chart in a batch without including a window size the results are unpredictable.
If you are using separate Tailor Analysis instructions to specify what appears in your analyses, and you omit them when you are running a subset of your batch, the subset will use whatever has been set in the Tailor>Analysis menu command. If your Tailor Analysis is the first instruction, you can put 1, 8 to 15 in the Instruction field to run the subset of instructions from 8 - 15 using the Tailor Analysis instruction.
Conclusion
This worksheet has described how to create a report in Snap, tailor it so that all the charts have the same dimensions, and use the Execute Analysis instruction to insert an existing analysis with its original look and layout.
For more about batches, see the section Introduction to batches .
There is reference information about the Batches window and the Batch dialog in the online help.
There is a worksheet available on Creating reports This covers creating a simple report from scratch.
Online Survey Poll from Snap Survey Software ...
If there is a topic you would like a worksheet on, email to snapideas@snapsurveys.com