This allows the subreport to be written so that the current item found by the parent report can be used wherever you want, in this case the final level.
REPORT "main: ddid by param example" ID 48038 { SETTING { DECIMALSEPARATOR "." } SETTING { LISTSEPARATOR "," } SETTING { MEASUREMENT METRIC } SETTING { PAGESIZE -1", 0.00 } TABULAR 1 { SELECT "Name" LEGEND "Performer" WHERE Class = Definition WHERE "Type Number" = 1367 ORDERBY "Name" SUBREPORT "Subreport: ddid by param" { DDIDBYPARAM TRUE } } } REPORT "Subreport: ddid by param" ID 60715 { SETTING { DECIMALSEPARATOR "." } SETTING { LISTSEPARATOR "," } SETTING { MEASUREMENT METRIC } SETTING { PAGESIZE -1", 0.00 } SETTING { HEADER 1 "Subreport: ddid by param" } TABULAR 1 { SELECT "Name" LEGEND "Activity" WHERE Class = Definition WHERE "Type Number" = 1326 ORDERBY "Name"
JOIN WHERE REFERENCEDBY = "Activity" JOIN
SELECT "Name" LEGEND "APBP" WHERE Class = Definition WHERE "Type Number" = 1380 ORDERBY "Name"
JOIN WHERE REFERENCES = "Performer" JOIN
WHERE Class = Definition WHERE "Type Number" = 1367 WHERE "Identity" = SASUBDDID } }