We are working in civiCRM 4.6.4 with Drupal 7.50.
Our goal is to have a report template where one can pull up a list of event participants (possibly for multiple events) who used a specific discount code and/or all participants who used a discount code for a specific event(s).
Some of our discount codes (automatic member discount etc) are used over the course of multiple events so the users list available from the civiDiscount admin page doesn't really accomplish this well for us.
A quick google search did not turn up an example report form for me to follow - nor do I see this in the 'extended reports' extension.
I see that the participant table seems to have discount_id and discount_amount columns, but when I inspect those columns in mysql I see all null and when I try a participant get with the API I get weird results when using those as parameters so maybe that won't work?
My next thought was to look at fee_level because participants seem to have the discount codes inserted into the fee level text. I thought I might add an additional participant_fee_level filter and title it 'discount code' with a 'like' operator to allow searching on discount code.
While this functionally works, I am wondering if there is a better solution as this one seems a bit rough. An example would be if someone wants to pull up all discount codes used for an event they need to know to fill the field with the value 'Discount' or '(', which pull up the same list. Also the 'starts with', 'ends with', '=', '!=', 'null', 'not null' options for the 'like' operator would not function as the user would expect.
Any thoughts on whether this is the best solution for now or there is a better (attainable) way to proceed are much appreciated!