none
SSRS 2005 - Dynamic Query handling. RRS feed

  • Question

  • Hello All,

    I need to generate a report based on some dynamic query. I am passing a query string to SQL Server procedure (from .Net UI), this procedure returns dynamic set of columns. These columns and number of columns can vary from query to query. I want to show these columns on report dynamically.

    Please suggest. Thanks in advance.

    -Regards

    -Kumud Vaish

    Friday, February 7, 2014 7:40 AM

Answers

  • Hi Kumud,

    I don't think it is possible do display the dynamic columns on the report since the columns and number of columns are dynamically.

    In a SQL Server Reporting Services report, we need to get the column name and use it on a column of a tablix control if we want to display it on a report. In your scenario, the columns name are dynamic. When reference to a column which not exist on the dataset, we will get the error
    "Report item expressions can only refer to the fields within the current dataset scope or if inside an aggregate, the specified dataset scope."

    Thank you for your understanding.

    Regards,


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Kumud Vaish Monday, May 21, 2018 6:26 AM
    Tuesday, February 25, 2014 8:38 AM
    Moderator

All replies