How to Use URL Access to Automate Report Downloading

The report server supports direct access to reports using a specified URL syntax. By using URL access, you can automate the process of downloading reports in your preferred format for further data processing.


For more detailed information, refer to the following external resources:



TABLE OF CONTENTS


You can access this feature from your MSL Admin site. Only Super Admins can access the Report Server.


For guidance on finding a group's ID for your URL parameters, see How to Locate a Group's ID Number.


For further information, see Report Server.


Building the URL


Basic Syntax

https://<report-server-url>/ReportServer?<path-to-report>[&<parameters>]
  • Report Server URLs:
    • UK/Ireland/UAE: https://reports.ukmsl.net
    • Australia/ New Zealand: https://reports-ap.ukmsl.net
    • Canada: https://reports-ca.ukmsl.net
  • Path to Report:
    • Starts with (/) followed by your site code and the folder structure visible in the report server.
    • Example: /demo/Memberships/Organisation%20List
Spaces are URL encoded as %20.
  • Parameters:
    • Report parameters (e.g. group IDs, dates, etc.)
    • 'Command' parameters prefixed with 'rs:' (e.g. rs:Format=CSV)


Testing the URL


Achieving the correct syntax for specifying report parameters can involve some trial and error. To streamline this process, you can test the URL by following the below steps. This method ensures you're already authenticated, so you won’t have to deal with any authentication issues:


  1. Log in to the Report Server (for further information, see How to Access the Report Server).
  2. Paste your URL into a new tab.


Examples


Organisation List Report in CSV Format


Below is an example URL for generating an Organisation List report in CSV format:

https://reports.ukmsl.net/ReportServer?/demo/Memberships/Organisation%20List&rs:Format=CSV

Detailed Members Report for Group ID 6013 in Excel Format


Below is an example URL for generating a Detailed Members report for group ID 6013 in Excel format:

https://reports.ukmsl.net/ReportServer?/demo/Memberships/Detailed%20Members%20Report&grouping_id=6013&rs:Format=EXCELOPENXML

Automating Report Downloads


Once your URL is set up correctly, you can use it in a script, either running it manually or as part of a scheduled task. You can use any tool or programming language that can issue an HTTP request with Basic authentication. Depending on your operating system, here are some options.


PowerShell


One option is PowerShell and the 'Invoke-WebRequest' cmdlet:

$Credentials = Get-Credential

Invoke-WebRequest -Uri "https://reports.ukmsl.net/ReportServer?/demo/Memberships/Detailed%20Members%20Report&grouping_id=6013&rs:Format=EXCELOPENXML" -OutFile "DMR.xlsx" -Credential $Credentials

This example prompts for credentials. To store credentials in the script, refer to this technique.


cURL


Using the -u parameter for authentication:

curl -u username:password -o DMR.xlsx "https://reports.ukmsl.net/ReportServer?/demo/Memberships/Detailed%20Members%20Report&grouping_id=6013&rs:Format=EXCELOPENXML"

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.