WebForms app using ServerReport - can I dynamically assign DataSource?

Hi All -

I found tons of posts describing how to dynamically assign a datasource to a ReportViewer control for local reports - but nothing for ServerReports. Is this possible We have a great need for this.

Thanks

-J



Answer this question

WebForms app using ServerReport - can I dynamically assign DataSource?

  • Dan Ferguson

    Take a look at this blog article for an example: http://blogs.msdn.com/bwelcker/archive/2005/04/29/413343.aspx
  • Hyperiest

    In server mode, the dataset queries are executed by the server, so the report viewer control can't supply a dataset. But depending on exactly what you want to do, you may be able to use report parameters to affect the dataset. You can use parameters in your queries as well as in an expression based connection string.
  • outcast1881

    Brian Hartman - MSFT wrote:
    In server mode, the dataset queries are executed by the server, so the report viewer control can't supply a dataset. But depending on exactly what you want to do, you may be able to use report parameters to affect the dataset. You can use parameters in your queries as well as in an expression based connection string.

    I believe dynamically modifying the connect string at runtime is what we would need to do. We want to point to a different "datasource" depending on conditions that are discoverabloe at runtime. By diferent datasource - I mean different database or even different server for the data depending on the conditions. We use stored sprocs for all our data - how would we be able to modify the connect string (you mentioned above) at runtime - that is excatly whet we need to do.


  • tomazek

    Brian -

    Thanks for the timely response. This looks promising althugh the blog has postings from a few unsucessful attempts in SSRS 2005. I will attempt this resolution and post the results.


  • WebForms app using ServerReport - can I dynamically assign DataSource?