It's all in the calculation you use and also must include the file path to where you want to save the file.
To compute the specific filename you want, you could combine this expression into the larger expression that includes the file path you want:
Let ( [ lastMonth = Date ( month ( Get ( currentdate ) ; 0 ; Year ( Get ( currentdate ) ) ;
FileName = "report " & MonthName ( LastMonth ) & " " & Year ( LastMonth ) ) & ".PDF" ] ;
/*Put path expression here */ & Filename )
Where do I have to put this expression? In the Set Variable line?
I've tried to use this expression to set the variable, but it says "Too many parameters".
Just a small typo. Try
[ LastMonth = ( Date ( Month ( Get ( CurrentDate ) ) ; 0 ; Year ( Get ( CurrentDate ) ) ) ) ]
// Put path expression here &
"Report " & MonthName ( LastMonth ) & " " & Year ( LastMonth ) & ".PDF"
You need to put the correct path expression in front of this (eg: "filewin:/D/Reports/" ) - it will evaluate the correct Report Title to append.
Thank to both of you, now it works!