0

I want to hide a report and it's print button if the status is not equal to APPR.

I already created a conditional expression, what are the next steps?

i.e. example: I want users to be able to print an Approved PO, but whenever the status of approved isn't met, they shoudln't be able to run or print the report.

using Maximo 7.5.0.4 with transportation module on websphere using db2 9.7 database.

davejal
  • 6,009
  • 10
  • 39
  • 82

1 Answers1

1

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":

  1. Open poprint.rptdesign in BIRT Report Designer.
    1. If you haven't installed BIRT Report Designer for Maximo, you'll need to.
  2. In the Outline view, navigate to poprint.rptdesign > Data Sets > mainDataSet
  3. Click the Script tab on the poprint.rptdesign tab.
    1. You should be looking at the open script, which has sqlText = " select... starting on line 7.
  4. Line 13 is + " where " + params["where"]. After this line, add your own criteria, like + " and po.status = 'APPR' ".
  5. Save.
  6. Import your updated version of the poprint.rptdesign report into Maximo.
Preacher
  • 2,127
  • 1
  • 11
  • 25
  • Could you elaborate a little more about part 2? I will vote, but I can't wait to long to implement this. – davejal Oct 28 '15 at 11:35
  • I'm getting a 500 error on the IBM page to vote. Any other links? – davejal Oct 28 '15 at 11:37
  • No other links. Just try again, later. – Preacher Oct 28 '15 at 15:18
  • And I updated my answer to have steps for modifying the PO report. – Preacher Oct 28 '15 at 15:19
  • thanks I will test this and get back, already upvoting your answer – davejal Oct 28 '15 at 15:49
  • could you elaborate on "Your users would appreciate it more if you gave some kind of error message telling them what to do" how to do it? – davejal Oct 28 '15 at 18:04
  • Unfortunately, I'm not a BIRT report writer. I have visions of an alternate heading or a header field showing up when the reports main query returns no rows, but I don't have free time to figure out how. – Preacher Oct 28 '15 at 18:25
  • The other thought is print a giant watermark text that says "unapproved" in the background that essentially makes it useless to submit. This watermark would only appear and print if the PO status was an undesired status. – Sun Apr 26 '16 at 21:55