Documentation

Settings and preview profiles

Configure AL Report Creator in VS Code. Reference extension settings, preview profiles, launch overrides and CRS options.

On this page

Settings

Set these values at user or workspace level in settings.json. Workspace settings take precedence and suit shared project configuration.

Setting Default Meaning
al-report-creator.columnNamePattern {FieldName}_{DataItemName} Dataset-name pattern. Supports {DataItemName}, {FieldName}, {TableName}, {FieldId} and {DataItemIndex}.
al-report-creator.rdlcFileExtension .rdlc .rdlc or .rdl for generated RDLC layouts.
al-report-creator.wizard.historyLimit 10 Automatic wizard history per project, 0–100; 0 disables it.
al-report-creator.preview.displayMode vscode vscode or externalBrowser. A VS Code tab can be moved to a separate window.
al-report-creator.preview.rapidDeployBeforeRender true Publish changed AL before rendering; false disables automatic publication.
al-report-creator.preview.renderTimeoutSeconds 120 Rendering timeout, 10–3600 seconds.
al-report-creator.preview.defaultFormatRegion local local, service or an IETF tag such as de-DE.
al-report-creator.preview.defaultZoomMode fit-page custom, fit-page or fit-width.
al-report-creator.preview.defaultZoomLevel 100 Zoom percentage, 25–300, for custom zoom mode.
al-report-creator.preview.defaultSpreadMode single single or two pages per row.
al-report-creator.preview.serviceDownloadUrl https://bc365.app/arc Download page offered for a missing or outdated companion app.
al-report-creator.preview.rdlcDiagnostics.serviceUrl empty Hosted RDLC diagnostic service for precise compiler errors.
al-report-creator.preview.rdlcDiagnostics.localWorkerPath empty Development-only local compiler worker path. The worker is not included in the production VSIX.
al-report-creator.preview.profiles [] Explicit connection profiles; prefer launch configurations with overrides in projects.
al-report-creator.preview.launchOverrides {} Preview-specific additions keyed by the exact launch configuration name.

Preview profiles and launch overrides

Field Meaning
kind onPrem or cloud.
baseUrl Full OData base URL; overrides server, port and instance.
server, serverInstance, port, odataPort On-premises connection values. The OData port is required when absent from the base URL; a common value is 7048.
tenantId / tenant, environmentName Tenant and environment for Business Central Online.
company Default company; if missing, the extension tries to retrieve a selection list.
username UserPassword username; the password is stored separately.
clientId, tokenUrl, scope OAuth settings. The latter two are needed for non-default Entra configurations.
previewServiceName OData action; defaults to RDLCPreview_GenerateReportPreviewBase64.
auth.mode userPassword, windows, oauthInteractive or oauthClientCredentials.

Example:

{
  "al-report-creator.preview.launchOverrides": {
    "BC OnPrem": {
      "kind": "onPrem",
      "odataPort": 7048,
      "company": "CRONUS AG",
      "username": "sp",
      "auth": { "mode": "userPassword" }
    }
  }
}

BC OnPrem must exactly match the AL launch configuration's name.

AL Language Extension and CRS settings

Setting Effect
al.rootNamespace Base namespace for generated reports and buffer tables.
al.namespaceTemplate Derives namespaces from project or folder structure.
al.packageCachePath Additional symbol-package directories; .alpackages is also considered.
CRS.ObjectNamePrefix Prefix for proposed object and file names.
CRS.ObjectNameSuffix Suffix for proposed names.
CRS.FileNamePattern Naming pattern for generated AL files.
CRS.AlSubFolderName Proposed AL output subfolder.
CRS.ReorganizeByNamespace Includes the namespace in folder suggestions.
CRS.OnSaveAlFileAction Respects the installed CRS extension's file organisation.

Review the resulting names, namespaces and paths in the wizard before generation. columnNamePattern concerns dataset columns; CRS settings concern object and file naming and storage structure.

OAuth: connect the preview to Business Central

OAuth lets you sign in through Microsoft Entra ID. AL Report Creator receives a temporary access token to connect the preview and Dataset Viewer to Business Central. You enter your Microsoft password only on Microsoft's sign-in page. This connection is separate from your AL Report Creator account and its API key.

These steps apply to Business Central Online. The target environment needs the Preview Service App; use ALRC: Manage Preview Service to install it. Ask your Entra/Business Central administrator to help with the one-time Microsoft app setup.

Which sign-in should I use?

  • Your Microsoft account (oauthInteractive): For everyday work in VS Code. You sign in through the browser and Business Central uses your user permissions.
  • An application account (oauthClientCredentials): The connection uses a registered app and client secret instead of your personal sign-in. The app needs its own Business Central permissions.

1. Prepare sign-in with your Microsoft account

  1. Your administrator creates an App registration for your organizational directory in the Microsoft Entra admin center. Note the Application (client) ID and Directory (tenant) ID from its overview.
  2. Under Authentication → Advanced settings, enable Allow public client flows. This device-code flow needs neither a redirect URI nor a client secret.
  3. Under API permissions, add the delegated user_impersonation permission for Dynamics 365 Business Central. Your administrator grants the consent required by your organization.
  4. Your BC user needs access to the environment, company and report data, together with the SPO ARC PREVIEW permission set.

2. Configure VS Code

Merge the following object into your existing .vscode/settings.json. BC Cloud Sandbox must exactly match the name of your AL configuration in .vscode/launch.json. Replace the example IDs with your Entra values and Sandbox with your BC environment name.

{
  "al-report-creator.preview.launchOverrides": {
    "BC Cloud Sandbox": {
      "kind": "cloud",
      "tenantId": "11111111-1111-1111-1111-111111111111",
      "environmentName": "Sandbox",
      "clientId": "22222222-2222-2222-2222-222222222222",
      "auth": { "mode": "oauthInteractive" }
    }
  }
}

tenantId identifies your Microsoft directory, not a BC company such as CRONUS. Select the BC company when first connecting, or add its name as company in the profile. Leave tokenUrl and scope unset for this standard setup.

3. Open your first preview

  1. Open an AL report and run ALRC: Preview Report.
  2. VS Code shows a sign-in code and the Microsoft sign-in entry point. Choose Open Browser, enter the displayed code if requested, and sign in with your BC user. Complete multifactor authentication if prompted.
  3. Return to VS Code and select the BC company if requested. The preview then loads.

The access token is stored in VS Code SecretStorage. You must sign in again after it expires. Automatic refresh-token renewal is not implemented, even though the requested default scope includes offline_access.

Alternative: application account with a client secret

Your administrator registers an app, creates a client secret under Certificates & secrets, and grants the Business Central application permission API.ReadWrite.All with admin consent. In BC, enable that client ID under Microsoft Entra applications and assign SPO ARC PREVIEW plus the required report-data permissions. Preview web-service calls do not require Automation.ReadWrite.All.

Use that app's IDs in the example above and change the authentication mode:

"auth": { "mode": "oauthClientCredentials" }

On first use, AL Report Creator asks for the client secret's value (not its ID) and stores it in SecretStorage. Never place it in settings.json or launch.json. This mode has no browser sign-in; the extension requests a token using the stored secret. Keep track of the secret's expiry date.

If sign-in fails

  • Application not found: Check that tenantId and clientId belong to the intended registration.
  • Consent required or device code blocked: Ask your administrator to check API permissions, public client flows and sign-in policies.
  • Signed in but access denied: Check the user or app's BC permissions, the selected company and the installed Preview Service App.
  • Invalid client secret: Check that you used the secret value instead of its ID, and that it has not expired.

On-premises requires a suitably configured Entra connection on the BC server; the cloud example alone is insufficient. Further reading: Microsoft: public client flows, Microsoft: Business Central application accounts.