I usually declare global vars in the main report and then in the same section as your subreport, I'd assign these global vars to what I need, in your case its the Header.id i guess.

Something like this, create a function and put this inside. Place the function just before the subreport object in your main report.

dim id as global
let id = {Header.id}
Edit: I don't know if this matters but I usually make sure that the function object where I assign the global var is defined before the subreport. Go to report explorer panel (on the right hand side) and use the arrows (or Alt+Arrow Key) to arrange accordingly.

and then inside the subreport's Filter function, I'd do something like

return (
  {subreport.id} = id // <-- this is the Global variable we declared in the main report