class CrosstabWithIds(CrosstabReport):
report_title = _("Cross tab Report With Pre-set Ids")
report_description = _("Pre-sets the crosstab column IDs to the first and last product via get_crosstab_ids(). "
"Useful when you want a known set of columns resolved at request time.")
def get_crosstab_ids(self):
return [Product.objects.first().pk, Product.objects.last().pk]