hexagon logo

Report file path keeps changing

I have the exact file path/folder I want selected in the print output for all of my programs, but it keeps changing on me. It seems to always default to the location of the previous program I ran, and I have to manually select the correct output folder each time I print the report. The filename and the index number, however, are always correct. It's just the destination that keeps changing. It does not change if I keep the same program open and run it multiple times. It only changes when I close the current program and open a new one. Does anyone else have this issue? I have a network drive selected as the output destination. Does that have anything to do with it?
  • What version are you running? Try uninstalling and reinstalling the PDF drivers.
  • 2017 R1, but I'd have to appeal to a higher authority to uninstall/reinstall anything. And he has much bigger fish to fry.
  • Be sure to check that the output is set to auto and not prompt.
  • Is this the only thing that you set in your PC-DMIS environment that 'reverts' from what you set it to be?
    As a test, attempt changing the folder path for your probefiles, close the software, then open it back up. If the path has reverted back to what was originally set, you need to have the software 'run as administrator', otherwise I would suggest having your IT group 'repair' the software. The repair mechanism is performed when attempting a re-install without having uninstalled the software.
  • Is this the only thing that you set in your PC-DMIS environment that 'reverts' from what you set it to be?
    As a test, attempt changing the folder path for your probefiles, close the software, then open it back up. If the path has reverted back to what was originally set, you need to have the software 'run as administrator', otherwise I would suggest having your IT group 'repair' the software. The repair mechanism is performed when attempting a re-install without having uninstalled the software.


    Thank you, I will try that. I'm still fairly new and our IT Department is pretty much just one guy and he's the vice president of the company. So he has more important things to deal with than my slight inconvenience. I have a feeling it's been like this for years, but my predecessor never questioned it.
  • At the start of my programs I assign the path to a variable.
    Like this:
    ASSIGN/REP_NAME="\PART_DFS3206"
    ASSIGN/SUB_PATH='"CUSTOMER\DFS3206"
    ASSIGN/PDF_PATH='J:\\PROTOKOLLS\"

    The first 2 ASSIGNS is changed, depending on the customer and partnumber.
    The third ASSIGN is never changed, it points the PDF-Report to the right folder on my server.


    When the program is through , I add som info to the filename.
    Ordernumber (input from the operator), Date and Time, so feel free to follow this setup

    ASSIGN/DATE=SYSTEMDATE("yyyy-MM-dd")
    ASSIGN/TIME=SYSTEMTIME("HH-mm")
    ASSIGN/REPDATETIMEORDER=REP_NAME + "_" DATE + "_" + TIME + "_" + ORDERNO.INPUT
    ASSIGN/FILENAME=PDF_PATH+SUB_PATH+REPDATETIMEORDER+".PDF"


    The key variable is now the variable FILENAME

    When I at the end does the printing, I have the settings in the PRINT-command
    TO_FILE=ON
    OVERWIRTE=FILENAME



    The only thing I have to adjust in every new program is the content in the 2 lines
    REP_NAME & SUB_PATH

    Easy peasy!



  • I would suggest using a Print command (rather than the Report print setup options) in your program itself (Insert > Report Command > Print Command).

    This way you can set everything program specific, rather that global application settings.

  • That's what I do, but the file destination always reverts to the folder that contains the program, not the one I select in the Print Command.
  • If it's prompting you to select a location, this usually means it can't access the location or the location does not exist. Some of your variable assignments look incorrect, but I'm not sure if that's just a post error or an error in the actual program. Like the single quote in your PDF_PATH variable and REPDATETIMEORDER is missing a + before DATE.

    To troubleshoot, place an operator comment before the print command and point it to the variable FILENAME. This should display the full path and pdf name so you can check if the path is correct. To check access, simply save as the program to one of those folders.

    Also, do you have scripts earlier in the program that creates those folders or you create them manually before running the program? Looking at your variables, you would have to create this folder before running:
    J:\PROTOKOLLS\CUSTOMER\DFS3206\​
  • Is it a network location?

    Does it happen when you it at the local drive?