Removing Cache from report dialog

Hi Techies,

Is there a way we can remove the syslastvalue on Report dialog(Parameter dialog)?

Thank you.

You can open usage data, find the corresponding record there and delete it.

Hello Martin Thanks for your reply. Actually this will erase only Syslastvalue. My client requirement is like whenever user opens a report dialog,the dialog should not populate with cache i.e previous values. Thanks

You asked how you “can remove the syslastvalue”, so that’s what I answered. Unfortunately it’s seem that what you wanted to ask was something else.

It seems that you either want the report not use previous parameters values, or maybe a query, when running the report again. Or maybe you want to initialize some parameters values every time. Please explain your requirements in detail.

Hi Martin, The report should not use previous parameters. So whenever the user opens a report parameter dialog, the parameters should be blank and user should be able to select the parameters . Thank you

You can override loadFromSysLastValue method on controller, this will prevent everything. Parameters, print setting , query values. If you only want specific parameters, you can override prePromptModifyContract and reset them.

All right, so you should avoid saving the values, rather then saving them and removing them later.

I would set parmLoadFromSysLastValue(false) in the constructor (below super()) rather that overriding loadFromSysLastValue(). The method contains data contract contract initialization that would be skipped, if developers don’t explicitly add it. It could lead to bugs problems later.

dasaradh, note that you can always look into code by yourself to see how it works. It’s done in normal X++ code available to you.