Report File Name and Tracefields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Report File Name and Tracefields

    I'm trying to setup automatic report file name saving using assignments and overwrite in the print report command. I am also currently using tracefields that the operator inputs the relevant information which populates the report header. I would like to use the information entered by the operator in the tracefields as the file name. Is this possible? So far I've only been able to have the file name save automatically using other fields like system time, system date, etc.
    I know I could have the report prompt when saving but I'd like to avoid the operator having to input the same data twice (once for the report header, once for the file name).

    Anyone have any ideas? Thanks

  • #2
    I don't know about using tracefield for that but its probably possible.

    You can for sure use operator comments to get that info. You can also use the operator comments to automatically fill in the tracefields without having to ask the operator to fill in the tracefileds. So the prog would not ask the same question twice.

    Are you saving to a network or locally on the cmm computer?

    Comment


    • #3
      I've seen people use comments to create the file name but I didn't know you could have comments fill in the tracefields. Is that also done with assignments? I'm saving to a network drive.

      Comment


      • #4
        credit goes to Schlag from another thread. See below.

        This is how I use tracefields. All the data is then sent with the stats into qccalc at the end of the program. What are you trying to do with them ?

        C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'MO #'
        C2 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'EMPLOYEE #'
        C3 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'WORK CENTER #'
        C4 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'WORK OFFSET #'
        C5 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'JOB STATUS'
        C6 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'INSPECTION GAGE #'
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; MO # : C1.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; EMPLOYEE # : C2.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; WORK CENTER # : C3.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; OFFSET # : C4.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; JOB STATUS : C5.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; INSPECTION GAGE # : C6.INPUT

        Comment


        • #5
          I think this is going to work. I'm trying it now and seems to be what I'm looking for. Thanks!

          Comment


          • #6
            This creates a PDF file name based on operator input fields from program prompts which are used to construct file path and file name based on the inputs
            caution; special character will cause problems, we have searchable electronic copies of CMM reports by job # and operation and part serial number.
            Code:
            $$ NO,
                        $$
                        ASSIGN/MACHINENUM=C6.INPUT
                        ASSIGN/ORDNUM=C10.INPUT
                        ASSIGN/OPNAME=C11.INPUT
                        ASSIGN/PARTNUM=C12.INPUT
                        ASSIGN/PART= STR(GETTEXT(191,1,{FILEHEDR}))
                        ASSIGN/DATE= SYSTEMDATE ("MMddyyyy")
                        ASSIGN/TIME= SYSTEMTIME ("HHmmss")
                        ASSIGN/TIME2= SYSTEMTIME ("HHmm")
            
            $$ NO,
                        $$
            
                        ASSIGN/V22="Z:\PROGRAMS\XXX\1XXXX_6\REPORTS\REV_6_OP_30A\1XXXX_REV_6_OP30A_JOB_"+ORDNUM+"_PART_"+PARTNUM+"_WRK_CTR"+MACHINENUM+"_"+TIME2+".PDF"
                        PRINT/REPORT,EXEC MODE=END,$
                          TO_FILE=ON,APPEND=V22,$
                          TO_PRINTER=OFF,$
                          TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME=,$
                          REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                          PREVIOUS_RUNS=DELETE_INSTANCES

            Comment

            Related Topics

            Collapse

            Working...
            X