How to use the Report Wizard for grouping records

Hello. I’m trying to use the Report Wizard for grouping records but it is not clear how to do. For a regular report, it works fine with a Header, Table and Footer

The result is as expected

But I want to group by “Categorie” and display a sum of “Montant” in each group footer. What is the proper way to add the fields to the report?
I tried this:

and many other combinaisons, but the report is always empty:

Can you show a printscreen of the 2nd page of the report wizard how to set the grouping and the table? Thank you for your help!

TestReport.fdf (3.4 MB)

Hi Jean,

Please import the attached FDF to help demonstrate what you are trying to achieve. You will need to do a bit of editing, so what I have done in the sample FDF is have two reports, the Stock Report Demo record is in its original state generated from the wizard and the Stock Report record is the edited version so you can compare them both.

The Sum function in the Report Wizard is only designed to sum up the total records, it has not been implemented to work in a Group By in the wizard. I will bring it up in our next product review meeting that we should add some more helper functions.

You have also brought to our attention that the records are not coming through for the Group By, it is returning the column header in the template, I will get this looked into.

As a solution for you, you can add the basics of your report in the wizard, add a custom function and edit the report template to end up with a result like below:

  1. Start by adding your report in the wizard with the group by, not the sum.

  1. Once your report has been saved, head to the Reports view and select the record, on the General page you will see a field called Code. Click in this field and you can add custom code that can be used in your report, this code editor acts as a library so you can add multiple code blocks here. These code blocks are in the attached FDF.

The GetTotalStockCountByCategory() will calculate the total stock count for the category in the group.

The GetTotalStockValueByCategory() will calculate the total value in stock for the category in the group.

  1. Save your functions, you can completely save your report record here if you want and edit it again or just click straight in the Template field on the General page. The template has been generated from the wizard and you can edit it here. The below image shows the original template generated by the wizard.

  1. This is what I edited:

a. Bold and centred the header, use the ribbon across the top.
b. On line three under the header, delete the Group By Header (as this is just the holder for what you want to call the group. Then bold Category (keep curly braces around Category).
c. Insert a horizontal line using the tool in the ribbon.

d. In the each block under the category header, delete {{category}} (this is the issue I mentioned earlier). Insert a table from the ribbon with how ever many columns you require and manually enter your fields (field IDs) wrapped in double curly braces. (I right aligned the last field.)

e. Delete the following: Group By Footer {{Category}}, Group By Final Product, delete the tables at the bottom.

f. Then add the following before the last ending of {{/_Each}} and {{_GroupBy}}

Total stock count: {{GetTotalStockCountByCategory Category @root.[Product].[Records]}}

Total stock value: ${{GetTotalStockValueByCategory Category @root.[Product].[Records]}}

Note 1: you can format them with underlines, bold etc using the ribbon.

Note 2: You will not need to manually add your functions into the template like this in the future as we are improving our Insert Fields section in the ribbon.

In case you didn’t already know there is a Change Mode tool in the top left of the ribbon (just hover on the tools to see their icons) if you know HTML and CSS, you can also use this side.

Let me know if you need any more images or something doesn’t work so we can get your report how you want it!

Kind regards,

Jo

Hi Jo,

This is a very complete answer, thank you! Very appreciated. I think I have all the tools I need to create my report :slight_smile: I will let you know how I am doing.

Regards,

Jean

Great, it works on my side! Still to do some formatting but the solution is fine for me. Thank you!

That’s great to hear Jean!

Hi Jo, I have an issue with TestReport.fdf . The footer and other texts are not displayed when there is only one record in one of the groups.
Here are the steps to reproduce:

  1. Modify the “Stock Report” Template like this:

    1. Add a line at the end of the report such as “This is the end of the report”.

    2. Add a footer and write some words in it such as “My footer”.

  2. Run the application.

  3. Display the Stock Report report.

  4. The report shows the groups, the text line after the groups and the footer. This is fine.

  5. In the application, delete a Product, such as Electrical - Kettle.

  6. Display the Stock Report report again.

  7. The text line and the footer are not displayed anymore.

Looks like the grouping is not closed properly in the html code but I don’t know how to fix it. I join the modified TestReport-with-footer-20250913.fdf file.

TestReport-with-footer-20250913.fdf (3.4 MB)

Thanks for your help!

Hi Jean,

Thanks for your steps, I have replicated this! Leave it with me as we are currently looking into a solution for you and will get back to you shortly.

Kind regards,

Jo

1 Like

Hi Jean,

We have identified the issue and are currently working on fixing it. If you would like, I can upgrade your account when the fix is implemented?

Kind regards,

Jo

Hi Jo, yes please, if you can upgrade my account as soon as the fix is implemented. Thank you very much!
Regards,
Jean