Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Script line Error: end if

Hi

Can someone tell me what is wrong with my report?

Please find the attached error.

error.JPG

Br

Anta

8 Replies
vijay_iitkgp
Valued Contributor

Script line Error: end if

Hi,

I think you are using loop on some if condition. Please see if you have end your if condition.

MVP
MVP

Script line Error: end if

Well,

Not having the script is kind of mission impossible to say where the problem is. But according to the error shown it seems that there is a line containing "end if" that either is not closing a previous opening IF or it appears when it shouldn't do (for example, within a LOAD statement).

Hope that helps.

Miguel

Not applicable

Re: Script line Error: end if

Hi,

check if you have an simicolon ";" after you ENDIF statement. If yes. Delete it. It is not necessary and will throw the shown error.

Regards.

Sabine

Not applicable

Re: Script line Error: end if

Please post script.

Not applicable

Re: Script line Error: end if

Hi,

I had similar problem.

I found that, in case of statement If  …. End If,   QV checks the syntax   after  Exit script;  

But it shows error only in one case - when using Dollar-Sign Expansion.

Check following code:

CASE 1

EXIT Script;

if $(NoVariable) = 1 then

end if

Then You get:




CASE 2

EXIT Script;

if NoVariable= 1 then

end if

No error message.

Check also what happens when you put these if … endif before Exit Script;      

Hope it helps

Sebastian

(I use QV11 sr6)

Not applicable

Re: Script line Error: end if

Hi,

Please share the qvw.

Regards

$@M

klaus_kapero
New Contributor II

Re: Script line Error: end if

Hello,

I had the same Problem. I fixed the Problem:

Behind !!  the "Exit script" sheet I had some "bad coding" which was red underlined.

After Setting the "bad coding" in // Comment Lines the script run's without Errors.

It seems that QlikView checks the complete script coding - also after the Exit script;

Best regards

Klaus

georges_galvan
New Contributor II

Re: Script line Error: end if

Hi,

I had a similar issue, and I fixed this as you say, by removing the dollars $ in the condition after the IF.

It seems that the $ are not nécessary.

I can confirm that Qlikview check the whole script in spite of the EXIT SCRIPT instruction.

Your fix has permited to me to stop loosing my time in this crazy bug.

Thanks you very much!

Georges

Community Browser