This tutorial shows you how to create a variety of module-based reports, queries, and views, and how to surface them in the LabKey Server user interface. The module makes use of multiple resources, including: R reports, SQL queries, SQL query views, HTML views, and web parts.

The Scenario

Suppose that you want to present a series of R reports, database queries, and HTML views. The end-goal is to deliver these to a client as a unit that can be easily added to their existing LabKey Server installation. Once added, end-users should not be able to modify the queries or reports, ensuring that they keep running as expected. The steps below show how to fulfill these requirements using a file-based module.


  1. Module Directories Setup
  2. Module Query Views
  3. Module SQL Queries
  4. Module R Reports
  5. Module HTML and Web Parts

Use the Module on a Production Server

This tutorial is designed for developers who build LabKey Server from source. Even if you are not a developer and do not build the server from source, you can get a sense of how modules work by installing the module that is the final product of this tutorial, then reading through the steps of the tutorial to see how these resources are surfaced in the user interface.

To install the module, download reportDemo.module and deploy it to your server. If you are using a premium edition of LabKey Server, you can load it without restart by following the instructions in the topic Module Loading Using the Server UI.

First Step


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all