Jump to content

Turn on or off PDF output


---
 Share

Recommended Posts

Trying to find a way to automatically turn off a specific PiWeb report (lets say its called "report2") based if a program has any "red" features.   I have up to 3 multi reports, with one of them just being a graph page if any features are out of tolerance ("red") but only have it outputting as a pdf.   Problem is that it will create a blank pdf (just header data) if nothing is out of tolerance.    Previous to Piweb, i have used the  defineProtocol("#type","presentationProtocol") defineProtocol("#medium","pdf")  to automatically turn on the custom printout and pdf.   I may be looking in the wrong places to see what i need to do for Piweb.   Note:  I have Piweb setup to use very little user input ... ie.. I have remove the ability make pdfs, change default rows, etc....

Link to comment
Share on other sites

I don't know offhand about turning off the pdf output of the report via PCM, however, it is relatively easy to just delete the unwanted pdf after it is generated, if that would work for you. In the default report end pcm text file you can check if there are any out of spec values with a PCM code (something like inspectionToleranceState, I do not have immediate access to a pc to check the exact command), condition off of that to determine whether to delete or not. I would also recommend using an ifFileExists within the deletion portion of the code to verify the pdf was generated before attempting to delete it, for robustness. 

Link to comment
Share on other sites

ooohhh... I forgot about just deleting it after the report was made..  That's easy...just wish there was away in PCM to just not have it on, then turn it on when out of tolerance. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...