We use the well document technique of passing parameters to reports and then running them from Codeunits.
Recently we used this technique to automate the Inventory Periodic reports
Adjust Cost Item Entries.
Post inventory Costs to G/L
Everything worked perfectly at first then one day we found a problem. The Post Inventory Costs to G/L report had run using parameters different from those supplied by the calling Codeunit.
We investigated and found that the parameters used were the same as those used when Post Inventory Costs to G/L was run from the Periodic Activites Menu.[:^)]
We experimented and we have found that if the Request Form property SaveValues is set to Yes then the report will use parameter values stored in the zup file and these values will overwrite parameters supplied using the parameter passing technique.
Our solution is to set the SaveValues property to No and now all is well again.
I hope that this note will prevent anyone else having a problem.[;)]