hexagon logo

2 reporting questions

1). Is it possible to change which report is used through a form radio button?
2). I want to create a custom label for machine adjustments from assignments.

Ie. Chiron correction 178 X=0.02 Z=-0.15
Parents


  • Creat a FORM (File > Reporting > New > Form Report)

    Add a radio button (RadioButton1)

    From the ListItems property add the desired values

    Save the Form Report.


    In your program have this:

    
    LOADPROBE/3BY30
    TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
    
    $$ NO,
    Initialise a variable for the report number
    The PARAM value is the name of the control (RADIOBUTTON1) and the VALUE property
    This is linked to the REPORTNUM variable
    
    ASSIGN/REPORTNUM=1
    
    CS1 =FORM/FILENAME= C:\USERS\PUBLIC\DOCUMENTS\HEXAGON\PC-DMIS\FORMS\REPORTSELECT.FORM
    PARAM/RADIOBUTTON1.VALUE=REPORTNUM
    PARAM/=
    ENDFORM/
    
    COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO,
    REPORTNUM
    
    $$ NO,
    Use a PRINT command to clear the report before loading the new Template
    
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=OFF,AUTO=1,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
    
    $$ NO,
    Use an IF statement to load the desired report BEFORE the dimensions (NOTE: report mode 'SWITCH')
    
    IF/REPORTNUM==1
    CS2 =REPORT/TEMPLATE, FILENAME= TEXTONLY.RTP, Section=-1,REPORTMODE=SWITCH
    PARAM/=
    ENDREPORT/
    END_IF/
    IF/REPORTNUM==2
    CS3 =REPORT/TEMPLATE, FILENAME= TEXTANDCAD.RTP, Section=-1,REPORTMODE=SWITCH
    PARAM/=
    ENDREPORT/
    END_IF/
    MODE/DCC
    
    <Measurement stuff here>
    
    PNT1 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
    THEO/<15.524,413.118,10.15>,<0,0,1>
    ACTL/<15.524,413.118,10.15>,<0,0,1>
    TARG/<15.524,413.118,10.15>,<0,0,1>
    SHOW FEATURE PARAMETERS=NO
    SHOW CONTACT PARAMETERS=YES
    AVOIDANCE MOVE=BOTH,DISTANCE BEFORE=0.3937,DISTANCE AFTER=0.3937
    SHOW HITS=NO
    DIM LOC1= LOCATION OF POINT PNT1 UNITS=IN ,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
    AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
    X 15.5240 0.0020 -0.0020 15.5240 0.0000 0.0000 ----#----
    Y 413.1180 0.0020 -0.0020 413.1180 0.0000 0.0000 ----#----
    Z 10.1500 0.0020 -0.0020 10.1500 0.0000 0.0000 ----#----
    T 0.0000 0.0020 -0.0020 0.0000 0.0000 0.0000 ----#----
    END OF DIMENSION LOC1
    
    <Print Command Here>
    
    
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,AUTO=1,AUTO OPEN=ON,$
    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
    
    




    NOTE!! This doesn't work well with the default report templates, which use a Header label tied to the Header rule in the Rule Tree Editor.

    For this to work, modify your report templates to have the Header design as part of the report template itself.
  • look into Case statements for your variables.
Reply Children
No Data