The Bank Statement Ending Balance on the Bank Reconciliation report is calculated based on the Bank Balance on the bank account less the total of all entries with a Cleared Date greater then the Statement Date on the report.
If the Bank balance on the bank account is wrong, the Bank Statement Ending Balance will not match the bank statement.