def METHOD_NAME(reportclass, request, *args, **kwargs):
    request.prefs = request.user.getPreference(
        reportclass.reportkey, database=request.database
    )
    return render(
        request,
        reportclass.template,
        {"title": _("Execute SQL"), "reportkey": reportclass.reportkey},
    )