XML Publisher - Dynamic Parameter passing from the Peoplecode

How to pass Dynamic parameter value to XML publisher Template using people code ?
How to pass Dynamic Parameter Value to XML Publisher from the runcontrol page ?

You need to pass these as runtime Properties through PeopleCode. The ReportDefn class has setRuntimeProperties() method that can be used for this purpose. So the PeopleCode behind your page will need to get the values from the page and pass them to the ReportDefn object.

Your PeopleCode will include something like this.

&asPropName = CreateArrayRept("", 0);
&asPropValue = CreateArrayRept("", 0);

You can pass more parameters here

&oRptDefn.SetRuntimeProperties(&asPropName, &asPropValue);
Process and publisher/print your ReptDefn here
In your template, you need to have something like:

Declares the parameter InvThresh
use the Parameter value by prefixing $ to the Parameter Name.
PeopleBooks includes an example on setting Runtime properties. 
PeopleTools passes the following parameters by default: