Last post Aug 24, 2011 06:05 AM by Nishantg
Aug 23, 2011 08:07 AM|eisbein777|LINK
Good day, i would like to know if it is possible to have a rdlc file with a dynamic data source, my sql is generated dynamically on this page and i am currently diplaying the results in a gridview control but would like to display it in a reportviewer control.
Any help would be greatly appreciated!
Aug 24, 2011 03:18 AM|Nishantg|LINK
You can pass your query to rdl file as a parameter and there in the dataset just set the value with this parameter. You need to sure that each query will produce the same name and same number of column.
Hope this will help you.
Aug 24, 2011 03:38 AM|eisbein777|LINK
Hi Nishantg, thank you for the response i didnt know this was possible and will look into it, unfortuanely what i am trying to do is build a dynamic report system wich uses different tables and columns, this works fine with gridview because i can just assign
the datasource on the fly.
Can you give me any advice or point me in the right direction, would it help if i create the rdlc file dynamically?
Aug 24, 2011 06:05 AM|Nishantg|LINK
Ya you can do this with your gridview, but you can't do it with Report. As Report needs to know about all the columns which it needs to diplay in table or matrix. There is one work around for it, you need to develop different reports for all possible combination
and then you can call them accordingly, but as I said earlier its not possible to change the column name at the runtime in Report.