I am trying to pass a dataset as a parameter to a SQL Query Data Source in a report.
The dataset has a list of IDs in the 'ID' column.
The query would be:
SELECT * FROM My_Table
WHERE id IN (?)
I tried setting Parameter 1 to groupConcat(my_dataset, 'ID', ',') but I think the parameter ends up like this "000, 001, 002, 003" instead of "000", "001", "002", "003"
Is this possible in the query data source, or do I have to do this in a script data source?
You can derive reports from a script so most things are possible. For example, you could look up a dataset within a script and output the report data from that.
I'd like to do it in a query because I can give them names in the Data Sources sidebar, my scripts all are named "Script" and its hard to find the right one when I need to change things
Don't use more than one script in a report. Just do everything in a single script. For ease of maintenance, consider having that one script call a project library function to actually do the work.
(A single report data script can add as many data keys as you like.)