hexagon logo

Dynamic Variable on Report

Hello. I'm looking to get some insight into this request and see if it is even possible.

The basic idea of what I want to try and do is add two variables to my report. These variables would be the location of the report and the user who is logged in to the computer.

So, when we save reports, everything is sorted by part number and then lot number. (example: \part123\lot456\date.pdf) If that is the save location defend in the report window print setup, is there anyway to get the "lot456" input as a variable in the header, only by defining the path in the report print setup? See example picture for reference.

The second thing I would like to do is add the have the currently logged in windows user show on the report. Ideally the display name but if only the username is possible, that is fine too.

Any help would be much appreciated. Thanks!

Parents
  • You could do something like this, except change MWO to LOT:
    MWO        =COMMENT/INPUT,NO,FULL SCREEN=NO,
                'MWO #.'​
    ASSIGN/WO=MWO.INPUT
    ASSIGN/REPORT_LOC2=PARTNUM
                  ASSIGN/REPORT_LOC="U:\User Files\Quality Assurance\CMM\04 - PART REPORTS\????"+BK_SLASH+PARTNUM
                  ASSIGN/REPORT_NAME=REPORT_LOC +BK_SLASH+WO+BK_SLASH+WO+"_00"+SN​
Reply
  • You could do something like this, except change MWO to LOT:
    MWO        =COMMENT/INPUT,NO,FULL SCREEN=NO,
                'MWO #.'​
    ASSIGN/WO=MWO.INPUT
    ASSIGN/REPORT_LOC2=PARTNUM
                  ASSIGN/REPORT_LOC="U:\User Files\Quality Assurance\CMM\04 - PART REPORTS\????"+BK_SLASH+PARTNUM
                  ASSIGN/REPORT_NAME=REPORT_LOC +BK_SLASH+WO+BK_SLASH+WO+"_00"+SN​
Children
No Data