Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello;
I'm trying reload a QVW file with the Binary sentence. But I need change the qvw file depending on the value of a variable.
I tried many things but I didn't success.
The script I have is soemthing like this:
IF vR=0 THEN
Binary [\\PATH\QLIKVIEW.qvw];
ELSE
Binary [\\PATH\QLIKVIEW2.qvw];
ENDIF
If I run this script I have this error message:
Unknown Sentence
Binary [\\PATH\QLIKVIEW.qvw]
If I run the script without the IF condition goes well.
I tried include the sentence in a text file and call it by: $(Must_Include=..\Scripts\Script1.txt);
This didn't go well.
I hope someone knows what I'm doing wrong. Is not valid writing poor English 🙂
Thanks,
Fernando
Hello Fernando,
I think Binary Load must be the first sentence in the script, and only one is allowed in the script.
I can't think in a way to have 2 different binarys in the same script.
Regards,
Gabriel
Hello Fernando,
I think Binary Load must be the first sentence in the script, and only one is allowed in the script.
I can't think in a way to have 2 different binarys in the same script.
Regards,
Gabriel
What if you - instead of setting vR to 0 or something else - define a variable with the qlikview file name to load?
Binary [\\PATH\$(vFile)];
Are you passing the value for vR from publisher?
You can also look into the solution suggested by Maxgro here:
Re: BINARY load with dynamic file name
This involves another QVW, so in server environment, you may need to first reload the first QVW with your vR passed to generate the include file, then reload the QVW with the include statement to execute the chosen binary.
Hi Fernando,
As per my knowledge, the binary statement must be the first statement in the LOAD script. so you cannot use it by preceding any other statement. This is applicable for the hidden script.
Seems you are not using any hidden script in the application. My suggestion is create an another variable something like,
Variable Name -> vFileName
Definition -> =if(vR=0, 'File1','File2')
Then use the binary load as (should be very first statement)
Binary [\\Path\$(vFileName)];
Let me know.
Thanks Gabriel
I didn't remember that the senetnce Binary in the script must be the first.
I did it with a variable.
Thank you very much,
Fernando
Thanks swuehl
I did it with a variable.
Thank you very much,
Fernando
Thanks Saravana
The problem was that the sentence Binary, in the script, must be the first.
I did it with a variable.
Thank you very much,
Fernando
Thanks Tamil
I didn't remember that the sentence Binary in the script must be the first.
I did it with a variable as you told me.
Thank you very much,
Fernando