Detect within a report if running in SharePoint integrated mode or Native mode-Collection of common programming errors

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 could be used:

=IIf (
        IsNothing (Globals!ReportServerUrl),
        "Running in SharePoint Integrated Mode",
        "Running in Native Mode"
)

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 “.rdl” from your drill through expression, something like that below:

=IIf (
        IsNothing (Globals!ReportServerUrl),
        ".rdl",
        ""
)

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.

Please let me know if you need more info.

HTH.

Cheers,

IceQB

Please mark correct answers 🙂