Saving Report Directory Glitch?

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

  • Saving Report Directory Glitch?

    Hi all,

    Printing the reports to a .pdf in an organised report folder using a VAR_FILENAME command with things like batch number, time etc used. The VAR_FILENAME contains the folder to save to.

    However, it does not save to that folder, it saves it to the higher folder. So if I had, for example, C:/CMM Reports/Part A it would save in C:/CMM Reports and not the folder I commanded. I tested it by putting a new folder in the folder required and asked it to save there and it saved to the higher folder (the folder I require). I know it's a fix but it's messy and there is risked it gets deleted in the future and maybe lose reports.

    Does anybody know what I am doing wrong or a possible fix? Its 2009.

  • #2
    Probably something wrong with the syntax you're using. Please post the code so people can see what you're doing and offer suggestions. One thing to note, generally when entering paths you need a double backslash - see my example below.

    Code:
    C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    Works Order Number
    ASSIGN/V1=STR(C1.INPUT)
    C2 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    Batch Number
    ASSIGN/V2=STR(C2.INPUT)
    C3 =COMMENT/INPUT,YES,FULL SCREEN=NO,
    Part Serial Number
    ASSIGN/V3=STR(C3.INPUT)
    
    ASSIGN/STARTPATH="C:\\USERS\\PUBLIC\\DOCUMENTS\\HEXAGON\\PC-DMIS\\REPORT_ARCHIVING_EXAMPLE_RESULTS\\"
    ASSIGN/V6=STR(GETPROGRAMINFO("PARTNAME"))
    ASSIGN/V8=STR(SYSTEMDATE("ddMMMyyyy"))
    ASSIGN/V9=STR(SYSTEMTIME("HHmmss"))
    ASSIGN/BUILT_PATH=STARTPATH+V6+"\\Works_Order_"+V1+"\\Bat ch_"+V2+"\\"+V8+"\\"
    ASSIGN/BUILT_NAME=V6+"_"+V3+"_"+V8+"_"+V9
    +"_"+V9
    $$ YES,
    .
    . PRINT command to save the report as .pdf in dynamically assigned location
    .
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,APPEND=BUILT_PATH+BUILT_NAME+".pdf",AUT O 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
    Last edited by neil.challinor; 02-22-2021, 06:02 AM.
    Neil Challinor
    PC-DMIS Product Owner

    T: +44 870 446 2667 (Hexagon UK office)
    E: [email protected]

    Comment

    Related Topics

    Collapse

    Working...
    X