Solved

Report Rule and Report Rule Log

  • 25 July 2022
  • 4 replies
  • 283 views

Userlevel 4
Badge +12

I’m trying to use the Report Rule Log to figure out why my report rule is not yielding the expected results and am having trouble understanding what the log is telling me.  

For each test, I get two records, one saying the result = TRUE (Log ID 152), the next saying the result = FALSE (Log ID 154).  I’d like to understand what’s happening at Log ID 154 so my rule is evaluating as FALSE.

This is what the actual rule looks like:

And this is the Expression 1:

[&SELECT NVL(cf$_subcontract,'No') from purchase_order_cfv p where p.order_no ='[@PURCHASE_ORDER_PRINT_REP/PO_HEADERS/PO_HEADER/ORDER_NO]' ]

As you can see by the log, the rule fires without error, but the action to add the pdf to the end of the report does not succeed.  

I’ve tried this with another rule to add the pdf where my custom field value = “Yes” and that works fine since I don’t have to do a coding work around to handle the null custom field values.  I’m pretty sure my issue is just with the way I’m creating Expression 1.

Any help is appreciated

 

 

 

icon

Best answer by mwilson 25 July 2022, 21:58

View original

4 replies

Userlevel 3
Badge +10

I am new to reading these as well, but it almost looks like there were two PO’s selected to be printed.

Userlevel 4
Badge +12

Thank you for the response, but I think this is only one PO and one result key.  I’m using the RMB/Print Order for one order.

I’ve got two rules, one where the custom field cf$_subcontract = ‘Yes’ and one where it’s either null or ‘No’ (Rule ID 20) .  The “Yes” rule (Rule ID 10) works fine and has the same two log lines, only both evaluate to TRUE and the pdf prints at the end of the PO.

For the screen-shot I included in this post, I disabled the “Yes” rule to declutter the screen.

 

Userlevel 4
Badge +12

@mwilson - You were on the right track. 

I figured out that one of the entries is for the preview results and one is for the print results.  I think this is because two documents are generated - one for the preview and one for the print.   Only the print document (Print Job ID 2120) is evaluated as TRUE.   This must have to do with when the report xml is available to be evaluated by my expression.

 

Userlevel 5
Badge +15

Hi @Tracy Norwillo 

 

Go to report archive and get xml data for report with the same result key as in report rule log. Check the value of cf$_subcontract.

The report rule log message column is a multiline text. Set the pointer in that field and wait a while to see all contents.

Reply