Generate a report which shows gaps in G/L entry No. if any

how can we show gaps in that report plz help me


How that is possible ?? How system will create Gap in G/L entry No ?? Have anybody deleted entries from G/L entry table.


In Denmark we used to have a special “Auditor Pack” - which was a bunch of reports created especially to support auditors. It was mostly financial reports, but also special year end customer and vendor statements (balance messages). And one of the reports were the one you ask for. A report which showed gaps in the number series.

I have not seen such a report, but it’s rather easy to do.

Start with the first number then use an indented integer and use INCSTR to increase the number until there are no more numbers in the series. Each time try to find the attached entry/document. But only print the line if it finds nothing.

Just saw that I miss read your question. My answer is about a report to show caps in G/L Document No.'s - not G/L Entry No.

As Amol also mentions, then this is not something which can happen, unless someone with access to a full developer license have manually deleted entries or your system somehow have other code (which you should NEVER have) which deletes code. Otherwise and in normal production setup, then there is no reason to test for missing G/L Entries.

But if you find one single entry no. that is missing, then you need to take a serious look at who you allow to update your system, who have access to a developer license.

i have taken the g/l entry number and entered in that table temporary number which does not have series.and set the properties but it was not showing the gap series…it will not possible to show gaps??

Do you want to show No series GAP or entry no gap???

no series gap in entry table

Just look at the standard report Sales Invoice Nos for reference.

thank u amol


can u suggest me the code to display the gaps…i want one warning msg in between the spaces.

Did you check the standard report 124 - Sales Invoice Nos.

It will show the warning message if the there is any gap in No. series…

Similar Logic you need to apply for G/L Entries…

ya i saw that and i tried in g/l entries there is one No. field…but it will not have any gaps in that report…i did nt get that

Can you please explain what you did not get ???


As a technical consultant you should know how to do this, it’s very easy if you have ever tried to build a new report in NAV (if not, then you should ask you boss for a NAV development course).

But if you’re more familiar with Excel, then here is another method you can try.

  1. Go into the G/L Entry table from object designer. Run the table.
  2. Copy all the entries. Select all + Ctrl+Insert.
  3. Open Excel 2010 (earlier version only support 65000 lines) and copy the lines here. It might take some time and you should do it when no users are online, as it also will kill performance in your system when you do it.
  4. After you have copied the lines, then you can compare the line numbers in Excel with the G/L Entry No’s. They should match or you have a gap. Then just go down the list to see where it start not to match. Or create an Excel formula/macro to do it for you.

iam very new to navision course thats way iam confusing and asking question…but u r reacting angrly.i justed started worked on was little bit confused right…

Hi Prasamsa,

Sorry if you feel I’m reacting angrily. That’s not the intend. But there’s a time to use the forums and a time to study. I think that the other members and I have suggested many different solutions to you.

And you still fail to tell us why you need this report (as per Amol’s first reply)!

The thing is that your request really should be a “non-issue” - as it’s not really possible unless someone destructively have deleted the posts manually or by a function. Someone who was in the possession of a developer license (as GL Entries cannot be deleted without it).

And you also fail to say why you think there is a gap when the suggested reports shows no gap?

Whenever you ask questions, always remember to include ALL details, such as WHY, WHAT and WHERE, i.e. Cannot post… Getting error when posting… in NAV 2009 R2 IN (product, version, country). If you do so then we’re able to help you a bit faster.

hi amol,

in the sales invoice y they used two times the data item sales header

ok…it is a task to me.iam a new trainee for navision.i mean learning navision.thats way iam asking like that…i will follow as u mentioned above.thanks for ur response

IF no.“Entry No.”<> THEN BEGIN
IF NOT(no.“Entry No.” IN[no.“Entry No.”,INCSTR(no.“Entry No.”)]THEN


UNTIL no.NEXT =0 ;