Skip to content

How to Separate Reports for Different Clients or Users in .Net Report Builder

.Net Report Builder supports Multi-tenant Clients so that you can save and view different reports for different Clients. With version 1.6.2, we also support saving Reports for different users. This guide will walk you through the process of setting up and managing separate reports for distinct clients and users within your .Net Report Builder environment.

What is Multi-Tenant Reporting?

Multi-tenant reporting is a way to manage data and reports separately for different clients or users within the same application. This is especially useful for organizations that serve multiple clients or have numerous users with unique reporting needs.

How to Set up Separate/Multi-Tenant Reports in DotNet Builder

Saving separate reports for separate clients or users is very simple. You need to provide the Client ID or User ID (or both) in Index.cs html in the initialization code:

$(document).ready(function () {
   var vm = new reportViewModel({
   runReportUrl: "@Url.Action("Report")",
   reportWizard: $("#modal-reportbuilder"),
   lookupListUrl: "@Url.Action("GetLookupList")",
   apiUrl: "@ConfigurationManager.AppSettings["dotNetReport.apiUrl"]",
   reportId: @(Request.QueryString["reportId"] != null ? Request.QueryString["reportId"] : "0"),
   accountApiToken: "@ConfigurationManager.AppSettings["dotNetReport.accountApiToken"]",
   dataconnectApiToken: "@ConfigurationManager.AppSettings["dotNetReport.dataconnectApiToken"]",
   userId: "", // You can pass your authenticated user id here to track their reports and folders
   clientId: "" // You can pass your multi-tenant client id here to track their reports and folders
 });

Specifying Client ID 

DotNet Report Builder allows you to manage reports for multiple clients by using a Client ID. Here’s how it works:

  • The system assumes you have an existing authentication process. It uses the current Client ID from your session.
  • Once you set the Client ID, the system saves and loads reports specifically for that client. Reports from other clients won’t be visible or editable.

If you have different clients, each with their own set of reports, setting the Client ID ensures that only the reports for the specified client are accessible and they are allowed to edit/delete only their reports. Reports saved with other Client IDs will not be shown.

Specifying User ID

To further customize the reporting experience for individual users, you can specify a User ID in addition to or instead of a Client ID. This is useful for scenarios where reports need to be user-specific.

  • When you set the User ID, the system will handle reports only for that specific user.
  • Just like with Client ID, the User ID should come from your existing authentication process.

If multiple users from the same client need their reports, setting the User ID ensures that each user sees and is allowed to edit/delete only their reports. Reports saved with other User IDs will not be shown.

Just to clarify, you can provide just the client Id, user ID, or both. If you specify both, the reports will be shown for both.

Global Run Only Reports

If you leave the Client ID and User ID fields blank, any reports you create and save will be treated as global. These global reports are available to all clients and users but have specific constraints:

  • All clients and users can view and run global reports.
  • Users with specified Client ID or User ID can’t edit or delete these global reports. To modify or create new global reports, you must omit the Client ID and User ID during report generation.

Global reports are ideal for reports that need to be accessible to everyone, such as company-wide performance metrics or universal dashboards.

Conclusion

.Net Report Builder’s support for multi-tenant reporting makes it a versatile tool for managing client and user-specific reports. By specifying Client ID and User ID, you can tailor the reporting experience to fit the unique needs of each client and user.

Let’s Work Together On Your Business Intelligence Requirements

Companies and Software Developers across many industries, from Banking to Oil & Gas, to Software Consultants and especially SaaS providers, rely on dotnet Report for their Reporting needs every day. Both internal and external stakeholders for these companies create Reports and Dashboards using our reporting engine to get meaningful and actionable insights to their data. Contact us today to see how you can get an edge over the competition with our modern Report Building Software.

Self Service Embedded Analytics

Need Reporting & Analytics?

Join us for a live product demo!We’ll  walk you through our solution and answer any questions you have.