Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to modularize a bit my report, and when I try this in my master script :
SUB GenerateStuff (a, b)
// Do stuff
END SUB
LET a=foo;
LET b=bar;
CALL GenerateStuff('$(a)', '$(b)');
It works perfectly. If I put the SUB...END SUB block in an external file and do this :
$(Include='external.script')
LET a=foo;
LET b=bar;
CALL GenerateStuff('$(a)', '$(b)');
The CALL to my GenerateStuff subroutine fails miserably.
Am I missing something here ?
I really don't see how to make it work... Quite a pain...
You don't need quotes when using include. Also, make sure to include any file extension (.qvs is the normal extension).
For example:
$(Include=external.script.qvs);
The include part is actually called through a variable :
$(Include=$(File))
Where File is the path to the file to be loaded.
The File actually loads and the script is run (verified by a trace), but the SUB routine isn't callable.
If I copy/paste the exact SUB...END SUB block in the main script, it *is* callable.
Weird...
Take a look at qlikview-components.
Itis whole library in include script - and it works.