General Ledger report not working

hello . as you can see in the screenshot , filtering the report by account is not working .
what is the problem

It looks like it’s working to me. The only records I see is the filtered “1149000000” account

I think that the account selected is a Group and maybe it is showing the childs too? Can you confirm if it is in face a group?

@dj12djdjs hello , thanks for replying . first one is 114800 and others at the rest of the report

hello , thank you for your reply . No , the “is group” check box is unchecked .

From “Report Builder” please check “LFT” and “RGT” field values for the accounts for which you are generating General Ledger.

@pioneerpathan hello , thank you for your reply . can you please be more specific.

@pioneerpathan they do indeed have the same lft and rgt . what happens if I change the values ? is it something related to the tree ?

Go to report view of the “Account” docType. There you can see two fields: LFT and RGT. These are basically indexes to build tree structure of accounts. I am assuming there will be some wrong ordering of indexes for accounts. For more details, please visit the topic: Issue in LFT and RGT update for few accounts in Charts of Accounts and not shown in the Balance Sheet report - #2 by pioneerpathan

which I had posted once I encountered a problem.

@pioneerpathan thank you very much . is it okay to change the values ?

I think, you first find out whether LFT and RGT indexes are incorrect or not? If it is then I will suggest you a workaround to resolve the issue.

can you suggest to us your workaround please

Yes @zbisho.

Accounts tree view structure is being build by LFT and RGT properties of an account. It means the child’s LFT and RGT must fall within the parent’s LFT and RGT. Please refer to my previous comment. If you change the parent account value of an account, the system will automatically rebuild LFT and RGT indexes for all the concerned accounts.

Please also note that an index value can not be used as either LFT or RGT index for more than one account.

Identifying any such anomaly will be the first step toward resolving the issue. If such a case is there then we need to rectify the improper indexes to obtain desire result.

1 Like

Sorry to bring up an old topic, but I have duplicate LFT and RGT fields, and it breaks filtering by account in the General Ledger.

You said in your post:

If you change the parent account value of an account, the system will automatically rebuild LFT and RGT indexes for all the concerned accounts.

How do you safely change the “parent account value of an account”, and are you referring to the LFT and RGT fields?

We are using ERPNext v15, and I don’t even see an option to include the LFT and RGT fields in the report view. I’m pretty sure manually changing them in the database won’t cause anything to rebuild, either.

There is a built-in method to fix the LFT and RGT properties of the entire tree view.

  1. Go to the tree view in question, and click on the “…” menu button, then
  2. click “Rebuild Tree”.
2 Likes

I guess this new option to “rebuild the tree” might be introduced in v15.

Anyway, did it resolve your problem?

It did fix the report. I looked at LFT and RGT afterwards, and notice it seemed to compact them as well.

1 Like

That’s a great…!!!