You are not logged in.
I have a Datasource Parameter that allows for multi-selection.
The query to generate options for this multi selection parameter (called: parentProjectNames) looks like this:
select name from parentProjects;
That parameter is going in to the primary query that looks something like the example below:
select * from childProjects where parentProject_id in (select id from parentProjects where name in ${parentProjectNames});
In the example query above, I NEED to make sure that "myDatasourceParameter" ends up looking something like the example below, but I don't know how to do this and need a little help please:
("projectName1", "projectName2", projectName3, ...)
Thanks!
Offline
Hi,
for dynamic lists you could use the $X{} parameter. That is your query should be
select * from childProjects where $X{IN, parentProject_id, THE_PARAMETER_KEY}
Cheers
-Arno
Offline
Arno,
Thanks you very much for the reply. One more question, what is the $X{} parameter and what can be done with it? Is there documentation somewhere that lists out some other internal parameters like the $X{} parameter?
Offline
Hi,
usually you use parameters as either $P{key} or simply ${key} which can be regarded as a typesafe replacement of the parameter value. The $X takes care of the special case for IN and NOTIN clauses. There is however quite a bit more to parameters which is all documented in the ReportServer admin guide http://www.reportserver.net/en/services/.
Hope this helps.
Cheers
Arno
Offline