Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
richardouellett
Creator
Creator

Upgrading to April 2019: On Post Reload Macros no longer work?

Hi

I skipped a few updates on my QV Server and Desktop yesterday and discovered after reading the upgrade notes that disabling BNF with ///$bnf off at the top of my script is no longer a solution.  As a result of this update my post reload macros no longer work.  Spending several hours on the Qlik blogs and Google I did not see any solutions to using macros with QlikView for 2018 and newer versions.  On an interim basis I switched back to an earlier desktop version that honored the ///$bnf  script workaround in order to produce my macro generated daily management reports.

Has Qlik essentially abandoned post reload macro support with their strict adoption of BNF compliance?  If not, can you direct me to some resources  and/or workarounds that can advise me on script and macro edits that are now needed to comply with the BNF standard?

Thanks so much!

Rick

11 Replies
Brett_Bleess
Former Employee
Former Employee

Richard, were you running the SR1 release of 12.40, or the IR version?  Check out the following article, not sure if it is what you are doing or not.

OnPostReload trigger does not work properly when using macro with user defined functions in QlikView... 

The full build number of 12.40 SR1 is 12.40.20100.  Best I can offer at the moment, and as far as I am aware, BNF will not be changed in 12.40 and later, it will remain enabled with no possibility to disable it as in prior releases.  

The other thing you may want to consider is looking into the NPrinting product to do these reports for you instead, that should be a much more reliable approach all the way around.

https://www.qlik.com/us/products/nprinting

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
richardouellett
Creator
Creator
Author

Brett

Thanks so much for responding.  I did use the full 12.4 SR1 version desktop when I did the macro testing and found that a number of my macros no longer worked when triggered; when I went back to 12.3 they did work.

The affected macros were generally tied to exporting to CSV/Txt files and printing reports.  Qlik implies that revised script coding needs to be done to correct this macro problem but offers not examples associated with VBS that I could find in Qlik support/community or Google.  Keeping my desktop at 12.3 is my temporary solution.  Implementing N Printing was pretty costly when I investigated it several years ago.

Rick

Brett_Bleess
Former Employee
Former Employee

Hey Rick, yeah, macros are generally supposed to be a last ditch effort for things, the editor module is based upon a quite old version of VB, believe it is 3.x if I recall correctly, and as far as I am aware, there are no plans by R&D/Product Management to update this either.  

The only thing I can offer is to have you try SR2, that was just released, and there are quite a few fixes in there, so may be worth a try to see if that gets things working again or not.  Sorry I do not have anything better for you.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
MikeW
Creator
Creator

Would it work if you run the macro as an on open trigger? (eg. have QMC reload the task, then have a supporting task that runs qv /vRunMacro=1 something.qvw, then have an on open macro that checks for the RunMacro variable and only do stuff if RunMacro=1, etc.. )

richardouellett
Creator
Creator
Author

Mike

Thanks so much for your suggestion.  I did try your approach without success.  It seems that the ability to  send a report to a printer and distribute to an email distribution list using a macro has been shut down with the newer QlikView version desktop tied to the inability to disable BNF.  If I revert to a previous desktop version the macro runs flawlessly.  Qlik implies the BNF coding format needs to be adhered to but provides no guidance on formatting VBS written macros to bring them into compliance.

Would very much like to know it this behavior is the same for Java written Macros?

Rick

MikeW
Creator
Creator

I tested a few export macros in 12.40.20100 and they seem to  run without issues. Maybe there is some functionality change in this version specific to how things are written in the problem macros.

You could try debugging your macro through vbscript or excel vba and see if that tells you what's going on. 

richardouellett
Creator
Creator
Author

Mike

Thanks for your suggestions.  I do not believe the QlikView macro editing within the application has a built in VBS debugger tool.  To the best of my knowledge it only has the "Test" button and if the written function is faulty it provides little to no information on why it does not work.  Additionally, I do not think VBS has its own debugger. However the VBSEdit freeware application does have a debugger but it is not usable within the QlikView which is calling the internal report object, variables and the BullZip printer in my case.

Just to be clear, the lost macro functionality seen with 12.4 QlikView desktop version are tied to my macros associated with report printing and email distribution macros.

Rick

MikeW
Creator
Creator

I find excel VBA to be reasonably decent when debugging Qlikview macros if you have to OCX. I think the OCX API is fully supported - unlike macros, even though they are pretty much the same thing. You would have to convert your code to VBA syntax and back, but I find the intellisense and debugging of the VBA IDE very useful. 

It also gives you another avenue to raise a complaint since Qlik can't say OCX is unsupported and use at your own risk. From what you are describing, it sounds like it could be an issue there as well.

richardouellett
Creator
Creator
Author

Mike

Thanks so much for this suggestion regarding the OCX.  Must admit that I never thought about this as an option, but will definitely investigate and pursue.

Rick