In the mdl_enrol table where the enrol column = 'cohort', the cohort id is saved in the column called customint1. So join mdl_enrol.customint1 to mdl_cohort.id and you should be able to pull both the course and cohort id in your report.
Randy
Randy