hexagon logo

WHY if / end if control pair does not work with the form

I would like to start by apologizing for my bad english. Please understand.​

I'm using the 2018R2 version. I would like the operator to choose his production team, which would result in saving the report in the appropriate folder. I created a form and a conditional if statement. The problem is that​ the report is not saved after selecting a team.​


C1 =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
Do you want to save the report ?
IF/C1.INPUT=="YES"
ASSIGN/OPTION1=0
ASSIGN/OPTION2=0
ASSIGN/OPTION3=0
CS1 =FORM/FILENAME= C:\MACHINE\REPORTS\FORM_1.FORM
PARAM/BUTTON1.CHECK=OPTION1
PARAM/BUTTON2.CHECK=OPTION2
PARAM/BUTTON3.CHECK=OPTION3
PARAM/=
ENDFORM/
IF/OPTION1
ASSIGN/V1="_PP_"
ASSIGN/V2=SYSTEMDATE( "dd'.'MM'.'yyyy' ")
ASSIGN/V3="C:\\MACHINE\\REPORTS\\PP\"
ASSIGN/V4=V3+V2+V1
PRINT/REPORT,EXEC MODE=END,$
TO_FILE=ON,AUTO=V4,AUTO OPEN=OFF,$
TO_PRINTER=OFF,COPIES=1,$
TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
TO_EXCEL=OFF,$
PREVIOUS_RUNS=DELETE_INSTANCES
END_IF/
IF/OPTION2
ASSIGN/V5="_MP_"
ASSIGN/V6=SYSTEMDATE( "dd'.'MM'.'yyyy' ")
ASSIGN/V7="C:\\MACHINE\\REPORTS\\MP\"
ASSIGN/V8=V7+V6+V5
PRINT/REPORT,EXEC MODE=END,$
TO_FILE=ON,AUTO=V8,AUTO OPEN=OFF,$
TO_PRINTER=OFF,COPIES=1,$
TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
TO_EXCEL=OFF,$
PREVIOUS_RUNS=DELETE_INSTANCES
END_IF/​
END_IF/​


Under Events, EventClick, In the VBS Mini editor. I just added the following code:
TheView.Cancel


What I did wrong or what needs to be added or changed ?



Parents Reply
  • Assuming I found the correct video, the form is setting a text object with the button value and using that value to be read by pcdmis.
    The button click event sets the text value and closes the form. You could do the same thing.
    You could add a text object to hold the value and make it invisible if you don’t want the user to see it.
Children
No Data