Part 1
I don't think there's a way to conditionally hide buttons for running reports, but I think having the ability to do so is a great idea. So, whether or not you implement the second part of my answer, I strongly suggest you a) vote for this RFE and add a comment about wanting it to support the use of Conditional Expressions or b) submit your own RFE. If you create your own RFE, provide us (SO readers) a link to it in a comment, so we can vote for it.
Part 2
Until IBM implements the RFE and you upgrade to that version, I suggest you add your criteria to the where clause in the poprint.rptdesign report. Your users would appreciate it more if you gave some kind of error message telling them what to do, instead of just printing blank pages, but it sounds like printing blank pages would be better than doing nothing and letting users print unapproved POs.
To "add your criteria":
- Open poprint.rptdesign in BIRT Report Designer.
- If you haven't installed BIRT Report Designer for Maximo, you'll need to.
- In the Outline view, navigate to poprint.rptdesign > Data Sets > mainDataSet
- Click the Script tab on the poprint.rptdesign tab.
- You should be looking at the
open
script, which has sqlText = " select...
starting on line 7.
- Line 13 is
+ " where " + params["where"]
. After this line, add your own criteria, like + " and po.status = 'APPR' "
.
- Save.
- Import your updated version of the poprint.rptdesign report into Maximo.