So I have a report with a matching subreport, based on two joined tables. The value: NameID from the one table is the parameter I wish to filter on.
The main table draws data from a query like this:
SELECT *
FROM NameTable
Where NameID = '111'
The subreport then is made up of a join query using the NameID from the first table.
SELECT *
FROM OtherTable
WHERE OtherID IN
(SELECT a.otherID
FROM OtherTable a
INNER JOIN NameTable b
ON a.variable = b.variable
WHERE b.NameID = '111')
I just want a way to make a matching report and subreport for every different NameID in the table. Is there a way to set a parameter or variable that can be then passed to the subreport or any other way for me to do this?