hexagon logo

Save reports in PDF automatically and use date and time as name

Hi,

I want to save the reports automatically after every run and use date and time for the name file. How I can do that?

Thanks!
Parents
  • ,
    Here is my code:

    ASSIGN/NUMOOT=GETPROGRAMINFO("NUMOOT")
    ASSIGN/DATE=STR(SYSTEMDATE ("yyyyMMdd"))
    ASSIGN/TIME=STR(SYSTEMTIME ("HHmmss"))
    IF/NUMOOT=="0"
    ASSIGN/REPORT_NAME="\\\server01\\CMM_REPORTS\\PART_"+DATE+TIME+"_PASS.PDF"
    END_IF/
    ELSE/
    ASSIGN/REPORT_NAME="\\\server01\\CMM_REPORTS\\PART_""+DATE+TIME+"_FAIL.PDF"
    END_ELSE/
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,OVERWRITE=REPORT_NAME,AUTO OPEN=OFF,$
    TO_PRINTER=OFF,COPIES=1,$
    TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME= REPORT_NAME,$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
    TO_EXCEL=OFF,$
    PREVIOUS_RUNS=KEEP_INSTANCES

    The problem now is that is not saving the file but is printing automatically.

    It's there any option that I need to turn off?

  • You are using the REPORT_NAME variable name for both the pass and fail, try naming them differently and see if that fixes the issue.
Reply Children
No Data