• The way I would handle this would be by passing the parameters as parameters to the query in the data set. So the query would look something like this:

    IF @OrderParameter = 'TOP'

    BEGIN;

    SELECT TOP (@TopParameter)

    *

    FROM

    sys.all_columns AS AC

    ORDER BY

    AC.name DESC;

    END;

    ELSE

    BEGIN;

    SELECT TOP (@TopParameter)

    *

    FROM

    sys.all_columns AS AC

    ORDER BY

    AC.name;

    END