Jump to content

Autosaving Multiple Report Formats


---
 Share

Recommended Posts

In the class, it was determined that only 1 PDF can be automatically saved to a file destination... unless PCM code is used, the multiple reports can be filed to multiple locations.
Does anyone familiar with the PCM code is, and how to apply it?
I emailed the instructor, and cannot get a response....
Link to comment
Share on other sites

You can make a variable in your programs presettings box called piWebReport something like follows. This assumes you have defined the ReportFilePath variable.

piWebReport = ReportFilePath+"\"+getRecordHead("planid")+"_"+getRecordHead("partnbinc")+"_piweb.pdf"

Once thats done, in Menu -> Resources -> Name for output files -> For this measurment plan

You choose pdf file for piWeb Reporting and instead of putting in a code like you normally would, you put in the variable name
piWebReport that you created above.

If you have multiple reports turned on it will create the first one with a (1) the next with (2) at the end of the name and so on.

They will as Laura pointed out be in the same folder though, so far as I have seen there is no way to place them in different folders.

You could I guess make something that moved them after the fact based on the filename if that became necessary.
Link to comment
Share on other sites

  • 4 weeks later...
Does that mean that if you define multiple reports of the same type, partnbinc is incremented inbetween? 😮
Shouldn't that only happen when the next run is started?
Link to comment
Share on other sites

No that number is not the inremental part number, thats a file number.

In the report itself the incremental part number remains the same, it just increments the number on the file but with the same name otherwise.

Lets say you have your filename defined so you get

012345_Rev_A_JN_00123_PN_001_piWeb.pdf

If you make it so you get multiple reports, you will end up with ..

012345_Rev_A_JN_00123_PN_001_piWeb(1).pdf
012345_Rev_A_JN_00123_PN_001_piWeb(2).pdf

Hope this clarifies it a bit.
Link to comment
Share on other sites

You're right, I got that wrong the first time.
But what is causing the numbering of the files? Is it a new feature in Calypso when two reports have the same name? Or is it because a variable is used? Or the variable name?

I'm asking because I tried something similar some years ago when multiple printouts were first introduced. I wanted two compact protocols with different output settings, but gave up because the first file was always overwritten by the second.
Link to comment
Share on other sites

I believe this is new to deal with the 'multiple reports' option.

You can only define one 'location' for piWeb reports, however the multiple reports allows you to create multiple different types of reports, for instance, you could make one using standard template and one using plot template.

If you made your own templates with different templates for different characteristics you might end up with even more.

This makes a unique identifier for each report you have defined on the multiple printouts page.
Link to comment
Share on other sites

Please sign in to view this quote.

That was exactly my problem. There's no way to define different paths for the same type of report.
I think I'll try it again, hoping that file numbering is applied to all report types, not just PiWeb.
Link to comment
Share on other sites

  • 5 years later...
Hi all,

Can we still not choose 2 different folder paths for the PiWeb reports?
This Topic was discussed in 2018 and were in 2023 now, I'm hoping that those 5 years would have changed this.

With kind regards Steff
Link to comment
Share on other sites

The option has not changed in relation to this. If you wish to see this enhancement, I advise searching the MyVoice module of the Portal and upvoting the request if it is already present. If not, create your own for this topic.

There are 3 ways to achieve this with varying levels of applicability and difficulty.
1 - If there are only 2 reports, you can use PDF and PDF_ALL in combination with Ghostscript. Send both to the location you prefer and send the PDF_ALL (that will be a combined report of the 2 in a single file) to another location. I understand this may not be the ideal method.
2 - PCM - Use PCM to copy/rename/move/delete in "report_end_pcm.txt" - This requires PCM license and some PCM knowledge to implement correctly
3 - Batch file - Use a batch file to copy/rename/move/delete in a "report_end.bat" file. No PCM license required but this may get flagged by your IT due to batch file security issues. Batch file coding is more widely known and easily attainable through a internet search.
Link to comment
Share on other sites

  • 2 weeks later...
The same type of reports are just saved as an array (1, 2, 3...) in the same location. Saving the same types of reports in different locations is not something I played with yet. If you have PiWeb, there is no reason to save the same report in different locations. I don't see a reason to save any reports anywhere. However, my customers want it so they get it. It is important to note that if you are going to use PiWeb only, you still need to use Report Header Fields for your Measurement Plan and Run in order to sort your data properly. Otherwise you'll have a bunch of worthless untraced data in PiWeb. 6193_72f16fb01e3ff76c411e643e319c444a.png
The way I handle autosaving is to create default save locations for ...all Measurement Plans. Resources > Name for output files > ...for all Measurement Plans...
Hit the dropdown and pick your file types. Then set up your entire path. (I have attached a .txt file as an example, you need to be correct and thorough). NOTE: Once you target a directory, if the sub folders do not exist, Calypso will create them using the report header data.
6193_429465c9be60e450245ea6e6be29ebd6.png
6193_928fa282e5e1d121bf5cb6e3b1942b08.png
SIDE NOTE: If add Default Report and turn off the screen view, it won't bother you anymore.

You would need to set up your report headers for all programs to be similar and can control how report headers are handled via PCM. You either need to write an inspection start pcm file or you can write it into each program if you have the PCM license. I recommend the inspection start file regardless because it will run at the start of every run.

You then need to write all your; get() and set() parameters for your headers as well as setting up the measurement plan headers that you use as a programmer (Customer, Drawing Number) vs what your operators will fill in each run. Then fill them in in the Report header parameters... under Resources. Check the box to require at start of run... "RUN" items will only show for the run.
6193_37ba581615b80fec5fe5a4651aa27840.png
6193_9135ddb30abaf7958d656cf72d1d24bd.png
I save a text file with my PCM commands as well as my default save locations. (The attached file is just an example)

AutoSave_FilePaths - Copy.txt

Link to comment
Share on other sites

 Share

×
×
  • Create New...