{"id":3297,"date":"2020-11-11T17:11:54","date_gmt":"2020-11-11T17:11:54","guid":{"rendered":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?post_type=epkb_post_type_1&#038;p=3297"},"modified":"2022-01-17T16:12:57","modified_gmt":"2022-01-17T16:12:57","slug":"generating-multiple-reports-using-a-context","status":"publish","type":"epkb_post_type_1","link":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/","title":{"rendered":"Generating multiple reports using a context"},"content":{"rendered":"\n<p>\n  Running a report to a context produces multiple reports \u2013 one for each possible code for that context. \n<\/p>\n\n\n\n<p>\n  This can be used to:\n<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\n    create one large report containing multiple versions of the report, one for each context\n  <\/li><li>\n     create a separate PDF for each iteration of the context\n  <\/li><\/ul>\n\n\n\n<p>\n  The examples use the Crocodile Rock Cafe survey that is supplied with Snap.\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating the Context Data Set<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>\n  Open the Crocodile Rock Cafe survey supplied with Snap.\n<\/li><li>\n  Set up your Context Data Set. For this example, it uses the single variable <strong>Q0<\/strong> (the location question) as the context. This enables you to automatically create a report for each possible value of location.\n<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"496\" height=\"246\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png\" alt=\"Context data set\" class=\"wp-image-3298\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png 496w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1-300x149.png 300w\" sizes=\"(max-width: 496px) 100vw, 496px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>\n  Click \n  <img decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-3299\" alt=\"SaveIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/saveicon-png-5.png\">\n   to save the context.\n<\/li><li>\n  Before using the context check that the global context value is not set.\n<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Running the report with sub reports<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>\n  Click \n  <img decoding=\"async\" width=\"26\" height=\"26\" class=\"wp-image-3300\" alt=\"ReportsIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/reportsicon-png-5.png\">\n   to open the <strong>Reports <\/strong>window.\n<\/li><li>\n  Double click the report to open it. In this example, the <strong>Summary <\/strong>report is used.\n<\/li><li>\n  In <strong>Filter<\/strong>, enter the context filter, in this case <strong>Q0=Q0@context<\/strong>.\n<\/li><li>\n  In Context, enter the context data set, in this case <strong>CX1<\/strong>\n<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"357\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent15-png.png\" alt=\"Report details showing a context and context filter\" class=\"wp-image-3301\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent15-png.png 497w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent15-png-300x215.png 300w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>\n  Click \n  <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"14\" class=\"wp-image-3302\" alt=\"Run button\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/run-button-3.png\">\n   to run the report. This produces a single report containing one sub-report for each possible value of the context.\n<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Running the report to create multiple PDFs<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>\n  In the Report Summary, click <strong>New Instruction<\/strong> \n  <img loading=\"lazy\" decoding=\"async\" width=\"25\" height=\"26\" class=\"wp-image-3303\" alt=\"NewSurveyIcon.png\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/newsurveyicon-png-17.png\">\n   to add a new <strong>Page Layout<\/strong> instruction. Alternatively, you can edit an existing Page Layout if there is one at the beginning of the Report.\n<\/li><li>\n  Select <strong>Start New Page<\/strong>.\n<\/li><li>\n  Select&nbsp;<strong>Restart Page numbers<\/strong>&nbsp;to ensure that each document starts on page 1.\n<\/li><li>\n  Select&nbsp;<strong>Start New Document<\/strong>. This places the report in a new file, so each time it creates the report for the different context, it will start a new file.\n<\/li><li>\n  Click&nbsp;<strong>Insert<\/strong>&nbsp;and select&nbsp;<strong>Variable field<\/strong>&nbsp;from the list.\n<\/li><li>\n  Select&nbsp;the context variable, for example <strong>Q0,<\/strong>&nbsp;as the&nbsp;<strong>Variable&nbsp;<\/strong>and&nbsp;<strong>Context&nbsp;<\/strong>as the&nbsp;<strong>Aspect<\/strong>. This will use the label of the<strong>&nbsp;Location&nbsp;<\/strong>for the current context as the filename, so the report for Boston will be given a filename of&nbsp;<strong>Boston, MA.pdf<\/strong>.\n<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"199\" height=\"165\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertcontextvariable-png.png\" alt=\"Insert a new context variable field\" class=\"wp-image-3304\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li>\n  Click <strong>OK<\/strong> to insert the variable.\n<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"382\" height=\"346\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/pagelayout-png.png\" alt=\"Page layout instruction starting a new report document for each context\" class=\"wp-image-3305\" srcset=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/pagelayout-png.png 382w, https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/pagelayout-png-300x272.png 300w\" sizes=\"(max-width: 382px) 100vw, 382px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\"><li>\n  Click <strong>OK<\/strong> to save the report instruction.\n<\/li><li>\n  Click&nbsp;\n  <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"14\" class=\"wp-image-3306\" alt=\"Run button\" src=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/run-button-4.png\">\n  &nbsp;to run the report then click&nbsp;<strong>OK<\/strong>&nbsp;on the&nbsp;<strong>Report Execution<\/strong>&nbsp;dialog. Depending on the PDF driver that you are using, and the way it has been set up, it will either automatically save or ask you to save the files. \n<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Running a report to a context produces multiple reports \u2013 one for each possible code for that context. This can be used to: create one large report containing multiple versions of the report, one for each context create a separate PDF for each iteration of the context The examples use the Crocodile Rock Cafe survey [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"epkb_post_type_1_category":[72],"epkb_post_type_1_tag":[],"class_list":["post-3297","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-using-contexts-in-reports"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generating multiple reports using a context | SnapSurveys<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generating multiple reports using a context | SnapSurveys\" \/>\n<meta property=\"og:description\" content=\"Running a report to a context produces multiple reports \u2013 one for each possible code for that context. This can be used to: create one large report containing multiple versions of the report, one for each context create a separate PDF for each iteration of the context The examples use the Crocodile Rock Cafe survey [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/\" \/>\n<meta property=\"og:site_name\" content=\"SnapSurveys\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/snapsurveys\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-17T16:12:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@snapsurveys\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/\",\"name\":\"Generating multiple reports using a context | SnapSurveys\",\"isPartOf\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png\",\"datePublished\":\"2020-11-11T17:11:54+00:00\",\"dateModified\":\"2022-01-17T16:12:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#primaryimage\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png\",\"width\":496,\"height\":246,\"caption\":\"Context data set\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Snap XMP Support\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Generating multiple reports using a context\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"name\":\"Snap XMP Support Hub\",\"description\":\"Support documentation for Snap Surveys products\",\"publisher\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\",\"name\":\"Snap Surveys\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"width\":867,\"height\":159,\"caption\":\"Snap Surveys\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/snapsurveys\",\"https:\/\/x.com\/snapsurveys\",\"https:\/\/www.linkedin.com\/company\/snapsurveys\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generating multiple reports using a context | SnapSurveys","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/","og_locale":"en_GB","og_type":"article","og_title":"Generating multiple reports using a context | SnapSurveys","og_description":"Running a report to a context produces multiple reports \u2013 one for each possible code for that context. This can be used to: create one large report containing multiple versions of the report, one for each context create a separate PDF for each iteration of the context The examples use the Crocodile Rock Cafe survey [&hellip;]","og_url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/","og_site_name":"SnapSurveys","article_publisher":"https:\/\/www.facebook.com\/snapsurveys","article_modified_time":"2022-01-17T16:12:57+00:00","og_image":[{"url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@snapsurveys","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/","name":"Generating multiple reports using a context | SnapSurveys","isPartOf":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#primaryimage"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#primaryimage"},"thumbnailUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png","datePublished":"2020-11-11T17:11:54+00:00","dateModified":"2022-01-17T16:12:57+00:00","breadcrumb":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#primaryimage","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/11\/insertingcontent13-png-1.png","width":496,"height":246,"caption":"Context data set"},{"@type":"BreadcrumbList","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/generating-multiple-reports-using-a-context\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/"},{"@type":"ListItem","position":2,"name":"Snap XMP Support","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/"},{"@type":"ListItem","position":3,"name":"Generating multiple reports using a context"}]},{"@type":"WebSite","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","name":"Snap XMP Support Hub","description":"Support documentation for Snap Surveys products","publisher":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization","name":"Snap Surveys","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","width":867,"height":159,"caption":"Snap Surveys"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/snapsurveys","https:\/\/x.com\/snapsurveys","https:\/\/www.linkedin.com\/company\/snapsurveys"]}]}},"_links":{"self":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/3297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1"}],"about":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/types\/epkb_post_type_1"}],"author":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/comments?post=3297"}],"version-history":[{"count":2,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/3297\/revisions"}],"predecessor-version":[{"id":5009,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/3297\/revisions\/5009"}],"wp:attachment":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/media?parent=3297"}],"wp:term":[{"taxonomy":"epkb_post_type_1_category","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_category?post=3297"},{"taxonomy":"epkb_post_type_1_tag","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_tag?post=3297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}