In Business Central as from version 20, which is 2022 Wave 1, when you develop a report without a layout and try to run it, like this one:

the following error appears:

Sometimes the error is different:

Report x does not have a layout of type Excel.

 

Normally and in previous versions of Business Central the request page would show and allow you to export the dataset to Excel, for analysis.

 

As a developer, before I add any layout to a report, I create the dataset (data items and columns), and then want to look at the runtime dataset to see if it’s good. Only then I add 1 or more layouts to the report.

Well, this is not possible anymore.

 

How can we fix this?

You need to add at least one layout to the report, for example:

and when you then run the report, the following error appears, again:

So what’s the solution?

You need to also add the DefaultLayout property, like so:

and then you can run the report, and export the dataset:

So you need to provide at least 1 layout, even if it’s empty, before you can run a report.

 

I documented this as a bug here:

Can not run reports without a layout anymore? · Issue #7020 · microsoft/AL (github.com)

Hopefully this will be fixed soon (BC 20.1), because I think it’s ‘suboptimal’ to have to create a layout simply to be able to export the dataset.

 

There are a few other errors happening in BC 20 that, I think, are related:

 

Another possible solution:

A possible solution, for the other errors mentioned here above, is in BC to open the new Report Layouts page and set a default layout:


Discover more from think about IT

Subscribe to get the latest posts sent to your email.

2 Thoughts on “How Do I: Fix Error: Report x does not have a layout of type None.

  1. Sathya B on November 23, 2023 at 06:09 said:

    i got !The report couldn’t be generated, because it was empty. Adjust your filters and try again.?

    • That’s an error you get when your runtime dataset is empty.
      This can be because the table(s) might be empty or you have applied filter(s) that result in no matches.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post Navigation