Dynamically showing Sections on reports
NAV does not limit you to one section of each type. You can have as many of each section type as you want, but you usually do not want to show every section on every report. This recipe will show you how to choose which sections to display.
How to do it...
Create a new report by following the Using the Report Generation Wizard recipe.
View the Sections for the report.
Add two headers below the current header and a body below the existing body section. The report should have five sections in total.
Move the column labels for the existing fields to the Header (2) section.
Add the following fields to the Body (5) section using the field menu: No., Name, Address, City, Country/Region Code, Post Code.
Move the column labels to the Header (3) section.
Your sections should be as shown in the following screenshot:
Add the following global variable:
Name
Type
ShowDetail
Boolean
Add a checkbox and a label to the report request form.
Set the following property on the...