Search code examples
reportmicrosoft-dynamicsdynamics-business-central

Error when passing parameters to report URL in business central


I have a custom report involving 3 dataitems in 1 dataset, the main dataitem is the "Customer" table and the only filter on the report is "No." as you can see below

report 50105 CustomerHistory
{
    Caption = 'Customer Sales History';
    UsageCategory = Administration;
    ApplicationArea = All;
    RDLCLayout = 'CustomerHistoryRpt.rdlc';
    WordLayout = 'CustomerHistoryRpt.docx';

    dataset
    {
        dataitem(Customer; Customer)
        {
            RequestFilterFields = "No.";
            column(CustomerNumber; "No.") { }
            column(Name; Name) { }
            column(Balance; "Balance (LCY)") { }
            column(E_Mail; "E-Mail") { }
            column(Phone_No_; "Phone No.") { }
        }

The report runs fine when I use the URL with report id:

https://businesscentral.dynamics.com/<tenant id>/?report=50105

but I cannot pass a customer No. in the URL I am always getting "the filter string contains invalid parameters"

I followed the below link for examples:

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-web-client-urls

I tried the below combinations and none of them works:

https://businesscentral.dynamics.com/<tenant id>/?report=50105&filter=%27No.%27%20IS%20%271452%27

https://businesscentral.dynamics.com/<tenant id>/?report=50105&filter=%27Customer.No.%27%20IS%20%271452%27

https://businesscentral.dynamics.com/<tenant id>/?report=50105&filter=%27CustomerNumber%27%20IS%20%271452%27

https://businesscentral.dynamics.com/<tenant id>/?report=50105&filter=%27Customer.CustomerNumber%27%20IS%20%271452%27

https://businesscentral.dynamics.com/<tenant id>/?report=50105&filter=%27No.%27%20:%20%271452%27

Solution

  • I found out that this is still not supported in BC similar to NAV:

    https://learn.microsoft.com/en-us/dynamics-nav/feature-limitations-of-the-microsoft-dynamics-nav-web-client#Report

    the workaround I did is to create a custom page with list parts and access the page through URL.