hexagon logo

Report Pop Up

Would the following even work?

I would like the operator to review the report, insert a comment at the end and the print it to a pdf. Our process is to run a part, read a report after it prints and the program is complete, and then gage any diameters that appear to be out. We need a comment at the end of the report that states the part was gaged. Any thoughts??

I've been playing with a few things but cannot get what I want exactly.

Thanks in advance.

No pressure, but this is HOT.
  • At the end of the program insert a comment that requires operator input. I suppose your operator would have to read the report off the screen (before it prints), then input any remarks you require into the comment box. After the operator hits OK, the program would end and the report would print.

    Not ideal, since it holds your machine up while the operator evaluates the results.
  • Yeah, if I can get the report to show up. The input box needs to be satisfied before you are able to even try to look at the report.

    That box won't allow a whole of anything to happen before it's dealt with.
  • Howdy John,

    The best option may be to add a box of text to the end of the pdf with an editor. I use one called PDF Xchange Viewer I downloaded for free. I like it better than Adobe. Just make certain there is a blank area large enough on the last page of the report, maybe use report comments to make that happen. This has the advantage that it can be done at any pc and while the next part is running.

    HTH
  • Sub[SIZE=2][COLOR=#000000] Main(strFileName [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000])[/COLOR]
    [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'assign ARG1= Report Location In script Line after SHOW=YES
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Shell "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe " & strFileName
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub
    [COLOR=#000000][/COLOR]


    ^ that script will open the pdf file after execute.

    There is a way to open an OLE object onto your report. I don't know how to make it a variable controlled one. I will play around with this and see if I can come up with something.





    [/COLOR][/SIZE][/COLOR][/SIZE]
  • You could look into using a two page report setup. You could keep you first page as your normal report, then on the second page include an OLE object. Load in a OLE object of a controlled form that implements an electronic signature by the operator, that says something along the lines of "I have reviewed the report and understand that by signing this I have inspected any and all dimensions that might be out of tolerance" blah blah blah blah.

    btw the 2nd section of a report object always prints last.

    Place in an object that is controlled by a variable pulled from pc-dmis that takes in an operator input and places it directly on the OLE object in the signature
    location.

    To me that is simpler.

    That is my input.
  • You can make it so the report is displayed as the program is executing (during execution hit 'Stop' then get the display as you want it, (i.e. hide the graphics window and edit window & show the report). PC-Dmis remember this layout for all future executions.

    You could then modify the report template by adding a new section (Max num pages set to one page).

    This is an effective way of having a sign-off sheet.

    On this you could have a text box control, if you put a tick next to the Text property of the text box you are prompted if you want to set the value (contents) of the box either the first time the program uses that template (useful for constant info like part name or description) or ever time the program uses that template, useful for variable info, like a serial number or in your case a declaration that they've everchecked with hard gauges.
  • Yeah, if I can get the report to show up. The input box needs to be satisfied before you are able to even try to look at the report.

    That box won't allow a whole of anything to happen before it's dealt with.


    Put this after your reporting, since it's only a halt operation not an input you can view the report and then let it continue to the rest of your endeavor Slight smile

    COMMENT/OPER,NO,You may preview the report now,
    ,select OK to continue
    ,
    ,"Out of tolerance features found : " + NUMBEROUT

    TK
  • Sub[SIZE=2][COLOR=#000000] Main(strFileName [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000])[/COLOR]
    [/SIZE][SIZE=2][COLOR=#007f00][SIZE=2][COLOR=#007f00]'assign ARG1= Report Location In script Line after SHOW=YES
    [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]Shell "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe " & strFileName
    [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]Sub
    [COLOR=#000000][/COLOR]


    ^ that script will open the pdf file after execute.

    There is a way to open an OLE object onto your report. I don't know how to make it a variable controlled one. I will play around with this and see if I can come up with something.





    [/COLOR][/SIZE][/COLOR][/SIZE]


    This (along with Wes's suggestion) just might work. If I can get the specific PDF to open right after it runs, that would save is a TON of headache.
    Now, I am not a script wizard, so I may need to be spoon-fed on how to use your script. I get everything but the green portion...

    Thanks.
  • This (along with Wes's suggestion) just might work. If I can get the specific PDF to open right after it runs, that would save is a TON of headache.
    Now, I am not a script wizard, so I may need to be spoon-fed on how to use your script. I get everything but the green portion...

    Thanks.


    the green portion is the part of the program where you call the script.

    
    $$ NO,====================================================
         ,PDF File View after Save &  Print Function
         ,====================================================
    PDF_VIEW   =SCRIPT/FILENAME= C:\PC-DMIS\4_3\BASIC SCRIPTS\PDF VIEW AFTER EXECUTE.BAS
                FUNCTION/Main,SHOW=NO,[COLOR=#ff0000][B]ARG1=STR(RPTPATH+NAME),,
    [/B][/COLOR]
    


    Red text is where you have to assign the report save location.
  • the green portion is the part of the program where you call the script.

    
    $$ NO,====================================================
         ,PDF File View after Save &  Print Function
         ,====================================================
    PDF_VIEW   =SCRIPT/FILENAME= C:\PC-DMIS\4_3\BASIC SCRIPTS\PDF VIEW AFTER EXECUTE.BAS
                FUNCTION/Main,SHOW=NO,[COLOR=#ff0000][B]ARG1=STR(RPTPATH+NAME),,
    [/B][/COLOR]
    


    Red text is where you have to assign the report save location.


    OK, got it. Now our process is that after a part is run, it automatically creates and saves the report on the server as a pdf. I just need a script to open that report.