{"id":24606,"date":"2017-03-07T22:04:55","date_gmt":"2017-03-07T21:04:55","guid":{"rendered":"http:\/\/help.qualiware.it\/qw-help\/?p=24606"},"modified":"2020-08-04T18:58:42","modified_gmt":"2020-08-04T16:58:42","slug":"esecuzione-di-un-report-e-download-risultato-in-pdf","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/esecuzione-di-un-report-e-download-risultato-in-pdf\/","title":{"rendered":"Esecuzione di un report e download risultato in PDF"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">' Il seguente frammento di codice mostra come eseguire un report REPX e farne scaricare il risultato in formato PDF\r\n' L'esempio \u00e8 riferito ad un report che estrae la stampa di un questionario\r\n\r\ndim numdoc as string\r\n\r\nUnPackCode(\"SC\",form.findcontrol(\"COD_QUEST\").value,numdoc)\r\n\r\nDim selection, f as string\r\n\r\nselection = \"{d.NUMDOC} = \"\"\" + numdoc + \"\"\"\"\r\nf = PrintReportWeb(form.Session, \"STAMPA QUESTIONARIO.repx\", New DBArray, selection, New DBArray, New AssocArray, \"PDF\") &nbsp;'&nbsp;!!!&nbsp;ATTENZIONE:&nbsp;la&nbsp;chiamata&nbsp;a&nbsp;PrintReportWeb&nbsp;non&nbsp;va&nbsp;MAI&nbsp;inserita&nbsp;all'interno&nbsp;di&nbsp;una&nbsp;transazione\r\n\r\nIf File(Q95_PATH_TEMP + \"\\\" + f) Then\r\n   BrowserOpen(Form, CreateDownloadRequest(form, Q95_PATH_TEMP + \"\\\" + f, False, \"QUESTIONARIO.PDF\"))\r\nEnd If<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente frammento di codice mostra come eseguire un report REPX e farne scaricare il risultato in formato PDF &#8216; L&#8217;esempio \u00e8 riferito ad un report che estrae la stampa di un questionario dim numdoc as string UnPackCode(&#8220;SC&#8221;,form.findcontrol(&#8220;COD_QUEST&#8221;).value,numdoc) Dim selection, f as string selection = &#8220;{d.NUMDOC} = &#8220;&#8221;&#8221; + numdoc + &#8220;&#8221;&#8221;&#8221; f =&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[65],"tags":[71],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/24606"}],"collection":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=24606"}],"version-history":[{"count":0,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/24606\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=24606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=24606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=24606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}