How to make queries contained in nested IF to work with RDLC?

kedgejabdob

New Member
I am using Visual Studio 2008.I have a stored procedure with code like this:\[code\]declare @query varchar(200)if (@Filter = 'T') set @query = 'select .......'else if (@Filter = 'D') set @query = 'select .......'exec(@query)\[/code\]@Filter is an input parameter in this stored procedure.When I try to set this stored procedure in Report's DataSource, the columns of @query are not recognized and not shown by the DataSource.How to make this type of nested IF containing query to work with RDLC?While creating DataSet for the report, RDLC is not picking the query columns.
 
Back
Top