I dug around a little more on this. I think that %ScriptParameter% does not mean a variable in the script in the sense that we mean, but is instead tied to the Parameter Name / Parameter Value on the reload tab and is used like a Repeat task in 8.5. So scratch that.
Unless there is some hidden way to insert formulas directly in the naming convention (and I don't think there is), you might need to create a separate field instead of a variable. This field would have a value of day(today()-1) for each instance of the field on which you are reducing. Then the naming convention could use %DocumentField,fieldname%. It's a little annoying to have to do it like this, but I don't know of any other way.
Hmmm, if I click on the Script Variable Value field, it puts in %ScriptParameter%. So I'm guessing you need the percents around the variable, just like you do around other non-literal stuff. So probably %vMaxDate%? Can't seem to make it work for me with a variable. Do I need to click the Open Document button first? Well, that makes Document Fields available, but the Script Variable Value still seems to do nothing. Tried distributing it to myself anyway, and all it did was add my variable NAME at the end, not the variable value.
Man, QlikView, don't MAKE me read the reference manual. Hmmm, it would probably help if I wasn't reading the version 8.5 reference manual. Oh, dear. Where did they stash the 9.0 publisher reference manual? Can't find it in our local documentation area. Can't find it for download from QlikView.
Ah, well. So, uh... should be easy but apparently isn't? Sorry about being no help!
Still no luck, %ScriptParamter, vMaxDate% returns a "blank"; Thus once you run the PDF generator, it fails ans states cannot find vMaxDate, even thought vMaxDate is a variable created during the script execution....
I'm stumped. The syntax should be correct but I'm getting the same behavior when I test it on my machine. It would be nice if Qliktech included this in the manual instead of forcing us to do it by trial-and-error...Anyway, sorry I couldn't be of more help. If you figure this out, can you please post the proper syntax here?