the problem to generate one page of sales order report

Dear All,
I am confusing about the report page. The coding of integer set as follows:
integer - OnAfterGetRecord()
rowline := 43 - counter;
IF Number > rowline THEN

The coding in the C/AL editor of sales line:
Sales Line - OnAfterGetRecord()
Sequence := Sequence + 1;
counter := counter + 1;
IF counter > 42 THEN BEGIN
counter := 0;

There are four sections in the report. The paper set is A4 (210 x 297mm)
Sectionheights are 4230 (sales line, header), 423 (sales line, body),423 (integer) and 3807
sals header, footer). in header and footer section properties, placeinbottom is selected to yes, in order
to fit the footer fully at the bottom of paper page. but the problem, the page become two pages although the integer or sales line has had 42 lines available. in the sales line there are only 39 items.
But after preview, there are only 35 items and in the page 2 is 9 items. Top margin is 2000. When top margin is set to 4000, then there will only 30 items in the page 1 and then 9 items in the page 2.Meanwhile there are still empty space available in the in the line and can accomodate 9 items. What other properties or are there any codings that can be used to solve the problem?
Any answers from you are apreciated so much. tku.


Forget about the fancy coding regarding row counters and similar.

There is no chance to overcome the automatic page break in Navision Report Designer.

You were referencing 4 sections, but only described 3.

Check if the “Keep with Next” properties is set to “No” for those section you do not need to keep with the next section.

I’m sure this does not really help, but:

You are not the first one and surely not the last one having this problem.

Hi Thomas, all,
I have done what you suggest beforehand but nothing influence.
I will describe more specific and the new problem comes.
The sections are:

  1. Sales HEader, header
  2. Sales Line, body
  3. Integer, body
  4. Sales Header, Footer

The section 2 and 3 contains shape (vertical shapestyle), in section 1 contains horizontal shape
(below customer info and ship to info). In the section 4, it also contains horizontal shape,
so all shapes will appear like standard table. However, when I select yes in the PlaceInBottom field,
in section 4 properties and keep with next to no, there is no influence, but the horizontal shape
of sales header footer can’t unite with vertical shape in the section 3. it’s separated. If PlaceInBottom
selected to no, the footer data like authorising signature, remark, etc will not fit fully in the page.
There will be empty space in the report page. it’s really stressful Thomas. MBS Navision must be improved. fortunately in 5.0 version, we can directly use visual studio or SQL to create report.



You need to play with the second lengths by turning the Snap to Grid off. We did this for one of our clients and it was a pain in the neck as well.

There’s no quick solution to this. You’ll just need to play with the margins and test. Also, each printer reacts differently to margins as well.

Good luck!

Dear Alex, all,

tku for your answer, I tried but as you said it seems very difficult and require a lot of trial and error work, maybe there are other solutions available??, I appreciate it so much



For the sake of finding a solution faster, you posted the same question on here:

The solution Luc suggested looks like it can work.

What you’re trying to do will require a lot of trial and error. There is no easier way to go about it.