Creating a workflow from data to report with a GUI-driven package produces something that is hard to repeat. If the data is updated, the pattern of clicks needs to be reproduced. Some software products adapt to this by introducing a custom macro system, or embedding a programming language. The user records a macro, or writes a short script, and replays that script when the data changes. A further step in automating the process from data to report is to have a report document that drives the analysis process itself. Such dynamic documents update to reflect the current data by running chunks of code within the report text. This presentation will show how the "knitr" package for the R statistical system can be used in a GIS context to produce a dynamic document with maps and spatial analysis, and also demonstrate a (hopefully) novel technique to integrate with QGIS so that reports can contain analysis results and maps produced there.