How to narrow search query result on LDAP browser?

Hi,
I am building a system that requires a the functionality of LDAP Browser to know if there are existing users or groups on a LDAP server. How will I narrow the result query if I run a proper report for both users and groups or any other alternatives than running a proper report?
