Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Using QlikView 8.5. I would like to execute a reduce data command after reloading a template. I have created a macro which makes some selections on the data and then attempts to reduce data. I have then attached that macro to the OnPostReload event trigger.
sub AfterReload
ActiveDocument.Fields("SubRegion").Select "NNI")
ActiveDocument.Fields("SubRegion").ToggleSelect "ENI")
ActiveDocument.ReduceData
end sub
The selection part of the macro works fine but the macro editor pops up at the ReduceData line. If I then save the template and re-open it I can successfully run the AfterReload macro without any problem. I have also noticed that after the reload, I cannot use the File / Reduce Data / Keep Possible Values command - no errors, just nothing happens.
This is really frustrating and any suggestions would be gratefully received.
Thanks, Kevin Long
I have a lot of QVW files, how should I batch reduce data?
Your script worked fine for me, albeit in v11. The only issue was that you have extraneous closing parentheses at the end of each of your selection lines.