'Get the representation method for a field in the report
@param field: the field selector'

def _represent_method(self, field):

    rfields = self.rfields
    default = (lambda value: None)
    if (field and (field in rfields)):
        rfield = rfields[field]
        if rfield.field:
            def repr_method(value):
                return s3_represent_value(rfield.field, value, strip_markup=True)
        elif rfield.virtual:
            stripper = S3MarkupStripper()
            def repr_method(val):
                if (val is None):
                    return '-'
                text = s3_unicode(val)
                if ('<' in text):
                    stripper.feed(text)
                    return stripper.stripped()
                else:
                    return text
        else:
            repr_method = default
    else:
        repr_method = default
    return repr_method
