• Rewrite your stored procedure so that it always gives the same amount of columns. If the selection dictates you don't need certain columns, fill them with NULL values.

    In the report, you can hide the columns you don't need.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP