this function moves to reportcases since nobody was using it except pact. date fields are now not supported explicitly since everything is a string, but we can still do range queries based upon string dates.