Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Specialist
Partner - Specialist

Hi,

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

Miguel_Angel_Baeyens

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
Author

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
Author

Please post script.

Not applicable
Author

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
Author

Hi,

Please share the qvw.

Regards

$@M

klaus_kapero
Contributor II
Contributor II

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
Contributor II
Contributor II

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