web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

AL Syntax for Opening Report Builder

(0) ShareShare
ReportReport
Posted on by 3,220
Hi:
 
In Visual Studio Code, I have composed syntax to open a report in Report Builder.
 
I must be doing something wrong in the syntax.
 
Upon trying to publish the report in Business Central, a web browser displays the following error message:


Here is the code for the launch.json file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Microsoft cloud sandbox",
            "server": "https://businesscentral.dynamics.com/f7146a22-294c-43d9-92f3-2f5d0abcfd4c/DevSandbox?",
            "request": "launch",
            "type": "al",
            "environmentType": "Sandbox",
            "environmentName": "DevSandbox",
            "startupObjectId": 50101,
            "startupObjectType": "Report",
            "breakOnError": "All",
            "launchBrowser": true,
            "enableLongRunningSqlStatements": true,
            "enableSqlInformationDebugger": true
        }
    ]
}

Also, the WTest.rdlc report doesn’t appear on the left in the Visual Studio Explorer.  Why not?

Below is the code for report.al and app.al.  How do I fix this, so that I may access the report as shown at the 7:02 mark of your video?

Thanks!

John


al.report
report 50101 "Client Report"
{
    ApplicationArea = All;

    RDLCLayout = 'WTest.rdlc';
    UsageCategory = ReportsAndAnalysis;

    dataset
    {
        dataitem(salesLine; "Sales Line")
        {
            column(salesItemNo; salesLine."No.")
            {
               
            }
            column(salesItemCode; code.Image)
            {

            }
            trigger OnAfterGetRecord()
            var
            codeGenerator: Codeunit "W Library";
            codeDotSize: Integer;
            begin
                codeDotSize := 4;
                codeGenerator.GenerateQcode(code, salesLine."No.", codeDotSize);
            end
        }
    }
    var
    code: Record "W" temporary
}


app.json
{
  "id": "49ae953e-be99-446d-8e3d-7fbbd447fa36",
  "name": "ClientProject",
  "publisher": "Default Publisher",
  "version": "1.0.0.0",
  "dependencies": [
    {
      "id": "62080fe0-d57f-4d4c-aed1-ac539db3a244",
      "name": "An AppSource Extension",
      "publisher": "An ISV",
      "version": "1.0.0.0"
    }
  ],
  "screenshots": [],
  "platform": "1.0.0.0",
  "application": "25.0.0.0",
  "idRanges": [
    {
      "from": 50100,
      "to": 50149
    }
  ],
  "resourceExposurePolicy": {
    "allowDebugging": true,
    "allowDownloadingSource": true,
    "includeSourceInSymbolFile": true
  },
  "runtime": "14.0"
}
I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at
    Server parameter is not required while using SaaS. It will ask you to authenticate with devicelogin for the first time.
     
    Please check whether it is working for standard page 22 instead of report and then change to report later.
  • Verified answer
    tanya07 Profile Picture
    1,638 on at
    Hello,
     
    in place of the server attribute, please use "tenant" :"f7146a22-294c-43d9-92f3-2f5d0abcfd4c"
     
    and as Mohana suggested run for standard page 22 and report later.
     
    BR,
    Tanya
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,380 Super User 2025 Season 2 on at
    Hi,
     
    You will have to generate .rdlc file.
     
    To see WTest.rdlc file in the VS Code use shortcut Ctrl+Shift+B. This will build and will generate the file.
     
    Once file is generated you can right click and select open externally. 
     
    ** To Open Externally you will require SQL Report Builder Installed. 
     
  • Verified answer
    Nitin Verma Profile Picture
    21,708 Moderator on at
    You can use the below configuration for SaaS version. <Change the below envrionment details and Tenant ID>
     
     "configurations": [
            {
                "name": "sandbox",
                "request": "launch",
                "type": "al",
                "environmentType": "Sandbox",
                "environmentName": "sandbox_dev",
                "startupObjectId": 22,
                "startupObjectType": "Page",
                "breakOnError": true,
                "launchBrowser": false,
                "enableLongRunningSqlStatements": true,
                "enableSqlInformationDebugger": true,
                "tenant": "XXXX436a859f-XXXXXX",
                "schemaUpdateMode":"Synchronize"
         }
            
     
  • JE-20081519-0 Profile Picture
    3,220 on at
    I still get the error, despite using all of these suggestions.
     
    Please help.
  • Gerardo Rentería García Profile Picture
    25,230 Most Valuable Professional on at

    Hi, good day
    I hope this can help you, and give you some hints.

    Launch JSON file - Business Central | Microsoft Learn

    Best Regards
    Gerardo

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,362

#2
YUN ZHU Profile Picture

YUN ZHU 867 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans