Hi,
My requirement is to pass a query at run time to the dataset. This is what I have at hand. A view (say it's name is View1) and a table (say table1).
Table1 has the columns ReportId, Report Name, Query, SortBy, GroupBy. The column Query would basically refer to View1. For ex: Query would have something like "Select col1, col2, col5 from View1 order by Col2 asc".
I need to select this query for a particular reportname (based on the ReportId column in table1) and pass it to Dataset in the RDL.
This is what I have so far. 2 datasets - one for View1, one for Table1. I have also written a function in the Report-Properties-Code tab. This basically selects the query for the reportid (I have the reportid as an input parameter) and returns this sql to the dataset.
My problem is, when I try to run this from preview, I get an error that says "invalid object Table1". What could be the problem here? I need help urgently please.