Issues with Reports

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

  • Issues with Reports

    Hey guys,
    I was needing a hand with Reporting.
    Lately we've had issues with non conformances
    and are needing a hand with resolving this.
    The solution was to start making a copy of the CMM report and scanning it into
    the Job folder.
    This is quickly becoming a major hassle trying to keep up with all this paperwork,
    My question is
    How can I get PC Dmis to do this automatically once a program runs.
    we have over a 1,000 programs by dozens of customers and I need an easy way for it to save a copy
    of the report into specific folders into our production drive.
    Thanks.
    I'm afraid I will have to add each one individually.

  • #2
    We use an input command to prompt the operator for a serial number. Then assign that to a variable like this.
    Code:
    C2         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                'SERIAL NUMBER'
                ASSIGN/V_SN=C2.INPUT
    Then create a custom path using the serial number like this.

    Code:
                ASSIGN/V_PATH="V:\CMM_REPORT\Part1234\Program1234_"+V_SN+".PDF"
    This puts the serial number at the end of the report name each time.

    Then using a print command set to overwrite we save the reports automatically to the assigned path like this.

    Code:
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,OVERWRITE=V_PATH,AUTO OPEN=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=IMPORT_SETTING,REPORT_FEATURE_WITH_DIMENSIONS=YES,$
                  TO_EXCEL=OFF,$
                  PREVIOUS_RUNS=DELETE_INSTANCES
    You could pull the comment directly into the path instead of assigning it to a variable first, but we use the serial number variable in a custom header label.
    PC-DMIS 2016.0 SP8

    Jeff

    Comment


    • Ekneel28@gmail.com
      [email protected] commented
      Editing a comment
      The serial number assigned, are you referring to the amount of parts made?
      like if we CMM the 1st pc. the serial number would be #1 on the report.
      is this what your referring to?

    • Schrocknroll
      Schrocknroll commented
      Editing a comment
      We have parts that are serialized by the customer and we use that. You could also use the date and time as Codewarrior shows below. It's all whatever you want to separate part reports.

  • #3
    This has many solutions. I run production and this is what I do in general for automating printing.

    I use VARIABLES and a PRINT COMMAND at the end of the report code section(s).

    You can create TRACEFIELDS or whatever works for you on the variables, in this example, I made them generic.

    Code:
       ASSIGN/FILE_CAV_NUM=CAV_001
                ASSIGN/FILE_DATE=SYSTEMDATE("MM.dd.yyyy")
                ASSIGN/FILE_TIME=SYSTEMTIME("hh.mm.ss")
                ASSIGN/FILE_NAME="5555-10 Layout" + " - " + FILE_CAV_NUM + " - " + FILE_DATE + " _ " + FILE_TIME + ".XLSX"
                ASSIGN/FILE_LOCATION="C:\\Users\\cmmmit\\file\\file\\First Piece Reports\\"
                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_DIMENSIONS=NO,$
                  TO_EXCEL=ON,OVERWRITE,FILENAME=FILE_LOCATION+FILE_NAME,AUTO OPEN=OFF,$
                  PREVIOUS_RUNS=DELETE_INSTANCES

    Comment


    • Ekneel28@gmail.com
      [email protected] commented
      Editing a comment
      I like this bit of code.
      very organized and complete.
      I will try and put this into action when I get back to work Tues.
      you guys have a great and safe memorial weekend.

  • #4
    Originally posted by CodeWarrior View Post
    This has many solutions. I run production and this is what I do in general for automating printing.

    I use VARIABLES and a PRINT COMMAND at the end of the report code section(s).

    You can create TRACEFIELDS or whatever works for you on the variables, in this example, I made them generic.

    Code:
     ASSIGN/FILE_CAV_NUM=CAV_001
    ASSIGN/FILE_DATE=SYSTEMDATE("MM.dd.yyyy")
    ASSIGN/FILE_TIME=SYSTEMTIME("hh.mm.ss")
    ASSIGN/FILE_NAME="5555-10 Layout" + " - " + FILE_CAV_NUM + " - " + FILE_DATE + " _ " + FILE_TIME + ".XLSX"
    ASSIGN/FILE_LOCATION="C:\\Users\\cmmmit\\file\\file\\First Piece Reports\\"
    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_DIMENSIONS=NO,$
    TO_EXCEL=ON,OVERWRITE,FILENAME=FILE_LOCATION+FILE_NAME,AUTO OPEN=OFF,$
    PREVIOUS_RUNS=DELETE_INSTANCES
    -------------------------------------------------------------------------------------------------------------------------------
    How did you get that line in BLUE there?
    I've tried and it wont let me add it.

    Comment


    • Ekneel28@gmail.com
      [email protected] commented
      Editing a comment
      you've assigned in the beginning a file.
      at the beginning of each of our programs the operators are prompted to enter the job#
      and then in another comment the serial number of the part. the serial number being the amount. like "01" for the 1st pc.
      how can I get it to add this automatically to the print report code for me?
      so that way its filled in for me
      and also if I wanted to look up reports from a specific job# I would be able to easily


      ASSIGN/JOB# HERE=SN# HERE
      ASSIGN/FILE_DATE=SYSTEMDATE ("MM. DD. YY")
      ASSIGN/FILE_TIME=SYSTEMTIME ("HH. MM SS")
      ASSIGN/FILE_NAME="TEST PIECE" + " - " + FILE_TEST_PC_NUM + " - " + FILE_DATE + " _ " + FILE_TIME + " .XLSX"
      ASSIGN/FILE_LOCATION="H:\\ZERIC\\FIRST PIECE REPORTS"
      PRINT/REPORT,EXEC MODE=END,$
      TO_FILE=ON,OVERWRITE=FILE_LOCATION+FILE_NAME.PDF,A UTO OPEN REPORT=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_OUTPUT=ON,
      PREVIOUS_RUNS=DELETE_INSTANCES
      when I opened the file location it was great. but how can I by comments have dmis auto fill in the print command stuff so that way later I can review the info by job# and serial#?
      Last edited by [email protected]; 05-28-2019, 11:01 AM.

  • #5
    I think that is a new feature for the print command in 2019 with excel. I'll show you the print command code for the PDF, this will work in 2017 version.

    Code:
       PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,OVERWRITE=FILE_LOCATION+FILE_NAME.PDF,AUTO OPEN=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  TO_EXCEL=ON,AUTO=161,FILENAME=XXX,AUTO OPEN=ON,$
                  PREVIOUS_RUNS=DELETE_INSTANCES
    1) after you set up the variables, put your cursor where it says "OVERWRITE" and hit TAB
    2) type in "FILE_LOCATION", then hit ENTER.
    --> it should ask "Is this referring to an input variable?" - select yes
    3) then go back and add in "+FILE_NAME"

    Comment


    • Ekneel28@gmail.com
      [email protected] commented
      Editing a comment
      FLAWLESS!
      Thank you!!!

    • CodeWarrior
      CodeWarrior commented
      Editing a comment
      No problem, glad to help

  • #6
    anyone know how to make an assignment from the input of a comment?

    Comment


    • #7
      I'm trying to get scheduled for a nov. class on the 301 course.
      I hoping to learn something there but honestly this forum has been the most helpful.
      I really appreciate you guys!

      Comment


      • #8
        For input comments
        Code:
        C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                    Please Edit Comment Text!
                    ASSIGN/V1=C1.INPUT

        Comment


        • #9
          Originally posted by CodeWarrior View Post
          For input comments
          Code:
          C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
          Please Edit Comment Text!
          ASSIGN/V1=C1.INPUT
          Perfect!!!!
          Thank you!!!!

          Comment


          • #10
            Okay 1 last question
            Does anyone know how to create selection boxes?
            like where I can in the field where I enter the customers name.
            Instead of hand typing them in, Being able to click and drop down and choose the customer?
            We have those functions on some things within Dmis like toggling the printer on/off and stuff
            And by having it to where I could toggle the customers would wrap this project up Nicely!

            As highlighted in green below.



            $$ NO,
            ----------------------------------------------------------
            ----------------------PRINT COMMAND---------------------
            ----------------------------------------------------------
            ASSIGN/V98=C1.INPUT
            ASSIGN/V99=C2.INPUT
            ASSIGN/FILE_DATE=SYSTEMDATE( "MM.dd.yyyy" )
            ASSIGN/FILE_TIME=SYSTEMTIME( "hh.mm.ss" )
            ASSIGN/FILE_NAME=V98 + " - " + V99 + " - " + FILE_DATE + " _ " + FILE_TIME + " .XLSX"
            ASSIGN/FILE_LOCATION="Q:\\CMM REPORTS\\ insert customer name here\"
            PRINT/REPORT,EXEC MODE=END,$
            TO_FILE=ON,OVERWRITE=FILE_LOCATION+FILE_NAME.PDF,A UTO OPEN REPORT=OFF,$
            TO_PRINTER=ON,COPIES=1,$
            TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
            REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
            TO_EXCEL_OUTPUT=ON,
            PREVIOUS_RUNS=DELETE_INSTANCES

            Comment


            • #11
              I found this thread to explain a good way to accomplish that. Search the forum for "radio button operator input" for related threads on this topic.
              Forms allow you to have pre-set values for the operator instead of them having to type them in.

              Originally posted by NinjaBadger View Post
              To do it with a form...

              1) File>Reporting>New>Form Report

              2) Place a Combo box from the Object Bar onto the form (if the object bar isn't visible press F2)

              3) Right click on the combo box to bring up the Properties window

              4) Expand the 'Advanced' section and change its name (ObjectCode) property to something meaningful (PalletNum)

              5) Click the ListItems property

              6) 'Add' an item (Name is what you want to appear in the listbox, just let the 'Value' be as it is. Repeat as necessary.

              7) Make sure the ComboType property is DropList (not DropDown)

              8) Save (File>Save) then Close (File>Close) the Form

              9) In the Edit Window of your program, create an assignment i.e. ASSIGN/PNUM=""

              10) Insert>Report Command > Form and browse to and select your form

              11) To link what is selected in your Form to your Assignment see below

              Code:
              ASSIGN/PNUM=""
              CS1 =FORM/FILENAME= C:\USERS\JON\DESKTOP\EXAPMLE.FORM
              PARAM/PALLETNUM.TEXTVALUE=PNUM
              PARAM/=
              ENDFORM/
              This links the TEXTVALUE property (what's selected in the drop list) of the control PALLETNUM to the ASSIGNMENT PNUM

              The user can only select what's in the DropLists, so you can do a quick test to make sure they've selected a value.

              Code:
              ASSIGN/PNUM=""
              TRYAGAIN =LABEL/
              CS1 =FORM/FILENAME= C:\USERS\JON\DESKTOP\EXAPMLE.FORM
              PARAM/PALLETNUM.TEXTVALUE=PNUM
              PARAM/=
              ENDFORM/
              IF_GOTO/PNUM=="",GOTO = TRYAGAIN

              Comment


              • Ekneel28@gmail.com
                [email protected] commented
                Editing a comment
                Amazing!
                Thank you!!!

              • Ekneel28@gmail.com
                [email protected] commented
                Editing a comment
                Okay so I got it all written out and input everything as you've shown.
                I do an F9 on the PARA/= and it gives me the droplist I wanted within the graphics display window, everything the way I made it.
                I choose the customer in the droplist but that's as far as it takes it?
                it's not adding it to the "PARAM/=" box inside the edit window.
                I'm assuming that's where it goes.

            • #12
              No problem old chap!
              Automettech - Automated Metrology Technology

              Comment


              • #13
                Here's my code.
                I'm not for sure about how this is all suppose to work.
                but its iterating continuously between labels?
                does this mean its right?
                ASSIGN/CNAME=" "
                TRYAGAIN =LABEL/
                CS4 =FORM/FILENAME= H:\ZERIC\ZERICNEEL\PCDMIS\CUSTOMER NAMES.FORM
                PARAM/CUSTOMERNAME.TEXVALUE=CNAME
                PARAM/=
                ENDFORM/
                IF_GOTO/CNAME==" ",GOTO = TRYAGAIN

                I'd like to be able to select a customer's name from the droplist I made and it automatically place it in the field for me.
                but when I choose the customers name it does nothing as far as I can tell.

                Comment

                Related Topics

                Collapse

                Working...
                X