Print Command

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

  • Print Command

    I use some variables and a print command in my program to save a pdf to a specific folder on the server, only issue is with 2019 R1 it's opening the prompt window when it tries to write the pdf file instead of just printing it to folder automatically. Is it something in my code or a bug in the service pack that I have?

    Here is the code:

    $$ NO,
    Variable Assignments
    ASSIGN/V1="C:\USERS\******\ONEDRIVE - ****************, INC\MYLAPTOP\DESKTOP\CMM Reports\Demo Program Lab Tech\" + "Demo Program"
    ASSIGN/V2=GETTRACEVALUE("Tracking Number")
    ASSIGN/V3=V2
    $$ NO,
    Print Command
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,OVERWRITE=V1 + "_" + V2.PDF,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

    Kevin

  • #2
    Check the "Execution Report Print Setup" window to make sure that each output in the tabs is not checked. This window will look the same as when you hit F9 on the print command in your code

    Comment


    • kmcmm
      kmcmm commented
      Editing a comment
      The "Report Window Print Setup.." when I click on "File" is blank on all three tabs and when I F9 the print command it comes up at "overwrite" which is what I want.

  • #3
    is that the same code you use in other programs?

    Comment


    • kmcmm
      kmcmm commented
      Editing a comment
      Yes it's the same code, I blanked out some of the information in the file path with **** because it contained personal and company information.

  • #4
    If pcdmis does not think it has permission to write to that location it will prompt the user.
    Another issue could be a permissions issue for some registry print setting. If the prompting dialog contains a concatenation checkbox, it is the Amyuni registry setting. Do a search on the forum for that resolution.

    Comment


    • #5
      Use dubble backslash: ="C:\\USERS\\****** .....

      Comment


      • #6
        You've *****'d out sensitive info, but what['s that comma doing there?


        ASSIGN/V1="C:\USERS\******\ONEDRIVE - ****************, INC\MYLAPTOP\DESKTOP\CMM Reports\Demo Program Lab Tech" + "Demo Program"
        Applications Engineer
        Hexagon UK

        Comment


        • dph51
          dph51 commented
          Editing a comment
          Reminds me of an old Neil Sedaka song lyrics,
          “Comma,comma down, shoobie-do down, down. Comma,comma down shoobie-do down, down. Comma, comma down shoobie-do down, down. Print commands are hard to use.”

      • #7
        Quoting Andersl

        Originally posted by AndersI View Post
        The double dialog when using "Prompt" is because you don't have enough access rights to the Registry key HKEY_CURRENT_CONFIG\Software\PC-DMIS 50 Converter

        The "Output File name" even in "Auto" mode indicates you don't have enough access rights to the folder you're trying to write in.
        There is a chance it's this issue. Give full control to users for that part of the registry hive and see if it fixes it if nothing else seems to work.
        Systems Integrator
        Hexagon Manufacturing Intelligence

        Comment


        • #8
          Resolved

          Even though I'm the administrator on my laptop, I wasn't running PC-DMIS as ADMIN, thanks a lot IT...
          Kevin

          Comment

          Related Topics

          Collapse

          Working...
          X