Choosing between 2 parameters

I have 3 fields: date1, date2, type. I need the user to input daterange and this is how I need the report to pull data: date1 in daterange OR date2 in daterange AND type = COMP. How can I make this work?

The report completely ignores date2. I can’t figure out how to make this work!