This Blog is about displaying the Invoice Number in the header of an RDLC report in Business Central.
When we print a sales or purchase invoice, we see the report has the invoice number in Bold on the Header of the report. How to Do that? Let’s See.
In RDLC, open the report and create the required layout.
As you can see from the above example, we are creating a sales order report. Below in the tables we have different columns from the Sales Order table. The table contains the line data to be displayed for that sales order. This RDLC format is used to print all the sales orders from the sales order list one after the other. Because of that having the sales invoice number in the header was one of the requirements.
Firstly, we need to create a text box that will be inside the rectangle where you have set the grouping conditions. And set the invoice number data from the datasets. We can create the textbox and assign the data but only the First value of the data set will be displayed which is not required. As we will be displaying all the sales orders. So we need the invoice number to iterate and change according to the sales order data displayed below in the table.
After that set the visibility of the field ‘Hide’. Because we don’t want two invoice numbers displayed in the report.
After hiding now create a field in the header of the report. In the expression of the field enter
In the place of Textbox48 Enter your Invoice text box name which you create and hide earlier. You can see the textbox name in the textbox properties.
After entering the expression save the RDLC and run the report in Business central
D365 Business Central