Jump to content

IS THERE ANY WAY TO SHOW POPUP WINDOW ASKING TO SELECT PI-WEB REPORT TEMPLATE FROM LIST?


Recommended Posts

I have one PCM program for cylinder head valve seat checking. I created 2 pi-web report template for this program. I select the template according to parameters to be checked. i.e. some time I use 1st template and some times 2nd according to parameters to be checked. but currently whenever I have to change template I have to go in Mullite Report each time and change template.

I want to know that "IS THERE ANY WAY TO SHOW POPUP WINDOW ASKING TO SELECT PI-WEB REPORT TEMPLATE FROM LIST?"
like using inquireList(Title,Point1[,Point2,...])
or anything else?
if yes then How?
Just copy the selected template and replace StandardProtocol.ptx


i = executeCode("WinProcess shOneOEM: 'cmd.exe /c dir " +qm() + getActualInspectionDir() +"\PiWebReportingTemplates\*.ptx" +qm() +" /b' .").asArrayOfLines.asList
listV=""
for n =1 to i.size
	if i.first <> "StandardProtocol.ptx"
	listV=listV +qm() + i.first +qm() + ","
	endif
i.removeFirst
next n


repeat 
selectedPw=compute("inquireList(" +qm() + "Select PiWeb Template:"  +qm() + "," + mid(listV,1,len(listV)-1) + ")")
until selectedPw <> ""

copyFile(getActualInspectionDir() + "\PiWebReportingTemplates\" + selectedPw ,getActualInspectionDir() + "\PiWebReportingTemplates\StandardProtocol.ptx")
PiWeb report status is determined in the load settings of the program. It cannot be changed once the Inspection Start Dialog is opened. (going from memory, I know it is determined at some point in the beginning of the program execution process).

What you could do is execute both reports then have a selection at the end of the run through PCM for which one to keep/delete results for. I imagine you could use the same PCM at the beginning as if it were a selection option but the action comes at the end of the program to keep/delete the proper reports.

I have used PCM commands to open the PDF created by PiWeb export rather than the PiWeb report itself in order to open reports in a specific order (usually based on Pallet run from AutoRun interface).
×
×
  • Create New...