{"id":6578,"date":"2014-04-20T13:42:13","date_gmt":"2014-04-20T13:42:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/20\/detect-within-a-report-if-running-in-sharepoint-integrated-mode-or-native-mode-collection-of-common-programming-errors\/"},"modified":"2014-04-20T13:42:13","modified_gmt":"2014-04-20T13:42:13","slug":"detect-within-a-report-if-running-in-sharepoint-integrated-mode-or-native-mode-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/20\/detect-within-a-report-if-running-in-sharepoint-integrated-mode-or-native-mode-collection-of-common-programming-errors\/","title":{"rendered":"Detect within a report if running in SharePoint integrated mode or Native mode-Collection of common programming errors"},"content":{"rendered":"<p>Hi Nick,<\/p>\n<p>Yes, you could use the Globals!ReportServerURL property to detect if the report is running in SharePoint Integrated mode or in Native mode.<\/p>\n<p>The ReportServerURL property is available \/ has a value only in Native mode whereas in SharePoint Integrated mode, it is empty. So I am guessing an expression like the one below could be used:<\/p>\n<pre>=IIf (\n        IsNothing (Globals!ReportServerUrl),\n        \"Running in SharePoint Integrated Mode\",\n        \"Running in Native Mode\"\n)<\/pre>\n<p>I am pretty sure this should work. You could just replace the True and False parts of the expression above to include or exclude the &#8220;.rdl&#8221; from your drill through expression, something like that below:<\/p>\n<pre>=IIf (\n        IsNothing (Globals!ReportServerUrl),\n        \".rdl\",\n        \"\"\n)<\/pre>\n<p>Just another point to be noted: This value is not set even when the report is run \/ designed in BIDS. So, you might just want to keep this is mind. Please ignore if you already are aware of this.<\/p>\n<p>Please let me know if you need more info.<\/p>\n<p>HTH.<\/p>\n<p>Cheers,<\/p>\n<p>IceQB<\/p>\n<p>Please mark correct answers \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi Nick, Yes, you could use the Globals!ReportServerURL property to detect if the report is running in SharePoint Integrated mode or in Native mode. The ReportServerURL property is available \/ has a value only in Native mode whereas in SharePoint Integrated mode, it is empty. So I am guessing an expression like the one below [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6578","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6578"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6578\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}