USER SEARCHABLE USER LIST:
I am still fairly new to Drupal but after some thought and initial reading of API's and modules etc. I thought I'd throw in my thoughts and see if anything bounces back (as it is very slow going from the ground up on my own!).

Currently it is possible to view a list of users (details) according to role.
I wish to create a new search/reporting facility that produces sub-sets of this list.
If my ideas rework existing code or are way off base for some reason then please feel free to point in the right direction.

My approach is to be in two phases (unless someone decides to help accelerate it. I need to have phase 1 by end of this month; phase two is the nicer way to do it, but consider phase 1 proof of concept):

Phase One
Phase 1 will
i) create a simple form for user input that lists the available profile fields for the search. This will only be avilable to members of the site (rid>0), and will allow selection of the criteria (from list or checkbox according to the profile_field type)

ii) on form submission the selection criteria will be used to form the data query before calling the function to produce the list of users
OR (if easier/possible for phase 1 )
use an overide of whatever the function is to 'display users list' and only display a user IF all search profile_field values = listing-user-profile_field values.

Tables to support this will be:

1: REPORT_NAME - one row for each report
report_name_id: int(10) = unique id for the report (or search)
report_name: varchar(60) = Text name given to report
uid: int(10) = uid of user allowed to run report (private report). If NULL then use
REPORT_ACCESS table to decide

2: REPORT_ACCESS - zero or more rows for each report. 1 row per role allowed to access
rid: int(10) = role id of role(s) allowed to run the report (if no uid specified in
REPORT_NAME)
report_name_id: int(10) = unique id for the report (or search)

3. REPORT_PROFILE_FIELDS - many rows for each report. 1 row per field in the report.
report_name_id: int(10) = report_name_id from REPORT_NAME
fid: int(10) = field id from profile_fields

Phase Two

Extends the functionality for:
i) admin users to design new reports and store them
= availability of all fields (accordng to role/visibility).

ii) To allow users to set a flag to create private reports for private use (uid field in REPORT_NAME table).

iii) (This is the streeetch target)
If someone got really excited about this and saw a need the next step would be to make it more generic to allow reporting on any table (allowed tables administerred by the admin) i.e. Table 4 would look like

REPORT_TABLES

report_name_id: int(10)
report_table_name: varchar(20)
and another with field names etc etc........kind of thing but this is all overkill for me.

So that's the general idea. I've not considerred all the rules yet but its the gist.
Apart from laughing me off the page I would appreciate any pointers as to the approach I should use for phase 1 so I can start to get to grips with working with the API's etc. Any help very welcome (including any applicable brain dump)
Some Questions in my mind (as they come):

- Some idea of how I launch my form; should it be via new node type that is accessed by an admin created menu, or should it be via a page with php that calls the forms functions - ouch! Any pointer to easy examples of how to create the form I propose (I found nothing helpful on forms in the example API's) and how to capture the input using Drupal API's (I've seen the list of form functions but I have suspicions I don't need the lower level if I can use existing code as much as possible.)
- assuming 'profile_browse'() is my 'list the users' function, then do I have to hack the code in profile.module, or is there a nicer way to do it say in .theme at the presentation level (see my Phase One para ii) OR statement above) - I can't see it if there is.
- ...or have I missed a bigger point somewhere? Is there a developer section I have missed?

Sorry for ranting but I'm early in the learning curve and suffering pain.
Any first aid welcome.