Hi there,
I feel like I'm quite close on this, but I'm hoping someone could give me some insight into saving a PDF report to another computer on the network.
This is the code I've been using to save a report locally:
pathString = "C:\MES\Reports\" # The location on the MES Server where we save reports
fileName = "Line Report.pdf" # Full file name
settings = {"path":pathString, "fileName":fileName, "format":"pdf"} # Settings parameters for the function
reportPath = "Template/" + equipment # The location of the template we're using
projectName = system.util.getProjectName() # Gets the project name of the current project
parameterList = {"StartDate":startDate, "EndDate":endDate, "LineNumber":lineNumber, "ShiftName":shiftName, "ProfileName":profileName} # Specify report parameters
actionType = "save"system.report.executeAndDistribute(path=reportPath, project=projectName, parameters=parameterList, action=actionType, actionSettings=settings)
I'm trying to write code to save this same report to another computer on the network, but I haven't gotten it to work yet.
As far as I know, assuming the folder on the remote computer is shared with read/write access (which this folder is) I should just be able to change my path string to point at this other folder. For my case, the remote computer is at 192.168.65.125, so I modified the code to:
pathString = "\192.168.65.125\MES\Reports\" # The location on the MES Server where we save reports
fileName = "Line Report.pdf" # Full file name
settings = {"path":pathString, "fileName":fileName, "format":"pdf"} # Settings parameters for the function
reportPath = "Template/" + equipment # The location of the template we're using
projectName = system.util.getProjectName() # Gets the project name of the current project
parameterList = {"StartDate":startDate, "EndDate":endDate, "LineNumber":lineNumber, "ShiftName":shiftName, "ProfileName":profileName} # Specify report parameters
actionType = "save"system.report.executeAndDistribute(path=reportPath, project=projectName, parameters=parameterList, action=actionType, actionSettings=settings)
I've tried changing the path to include the host name instead, removing slashes, adding slashes. Nothing I've done has worked so far. Does anyone know if there is any other parameter I need to change or if I should be using a different instruction to save remotely? Perhaps there is a windows setting I'm missing that is hindering me?
Thanks in advance.