select companies.company_name, companies.company_id, sites.site_name ; from (lcCompanyfile) companies ; full join (lcSitefile) sites ; on companies.company_id = sites.company_id ; where sites.status = "TRP" ; order by companies.company_name, sites.site_name ; into cursor crsTempand the report is grouped on company_name, how would you count the number of unique company names? All my attempts result in counting every record. I could create a unique index before calling the report but that seems clumsey to me.