Skip to main content
Solved

Apps 9 Report Rule ERROR Evaluating Expression

  • June 10, 2020
  • 5 replies
  • 386 views

pwlm
Hero (Partner)
Forum|alt.badge.img+11
  • Hero (Partner)
  • 77 replies

Want to set logical printer for INVENTORY_PART_BARCODE_REP using a Report Rule. Using the following expr1:

[&select inventory_location_api.get_location_group(ipis.contract, ipis.location_no) 
from inventory_part_in_stock ipis 
right outer join inventory_part_barcode ipb 
  on ipis.contract = ipb.contract 
  and ipis.part_no = ipb.part_no 
  and ipis.configuration_id = ipb.configuration_id 
  and ipis.lot_batch_no = ipb.lot_batch_no 
  and ipis.serial_no = ipb.serial_no 
  and ipis.eng_chg_level = ipb.eng_chg_level 
  and ipis.waiv_dev_rej_no = ipb.waiv_dev_rej_no 
  and ipis.activity_seq = ipb.activity_seq
where ipb.contract = '[@INVENTORY_PART_BARCODE_REP/BARCODE_LINES/BARCODE_LINE/CONTRACT]' 
and ipb.barcode_id = '[@INVENTORY_PART_BARCODE_REP/BARCODE_LINES/BARCODE_LINE/BARCODE_ID]']

Ordinal: 10

Operator: =

Expr: 100 

I get the following errors:

Rule ID=40 ORA-31011:ERROR Evaluating Expression=''[@INVENTORY_PART_BARCODE_REP/BARCODE_LINES/BARCODE_LINE/CONTRACT]'' result_key=538036formatter_properties=LocaleCountryGB

Rule ID=40 ORA-31011:ERROR Evaluating Expression=''[@INVENTORY_PART_BARCODE_REP/BARCODE_LINES/BARCODE_LINE/BARCODE_ID]'' result_key=538036formatter_properties=LocaleCountryGB

I have tested the SQL statement; it works… and I have tried removing all non essential spacing.

Any other ideas?

Best answer by pwlm

@Rusiru.

I have solved this very simply - the Create XML checkbox in the Report Definition for INVENTORY_PART_BARCODE_REP was unchecked!

Now checked!

 

5 replies

Rusiru Dharmadasa
Superhero (Employee)
Forum|alt.badge.img+20
  • Superhero (Employee)
  • 697 replies
  • June 11, 2020

I have tried this in local app9 environment and it works without any issues. May be your query returning more than 1 row? It must return only 1 row. Try appending FETCH NEXT 1 ROWS ONLY at the end of the query - before the last closing bracket ]


pwlm
Hero (Partner)
Forum|alt.badge.img+11
  • Author
  • Hero (Partner)
  • 77 replies
  • June 11, 2020

I have tried this in local app9 environment and it works without any issues. May be your query returning more than 1 row? It must return only 1 row. Try appending FETCH NEXT 1 ROWS ONLY at the end of the query - before the last closing bracket ]

Thanks @Rusiru.

I am getting the same error - can I asked which UPD your local Apps9 env is?


Rusiru Dharmadasa
Superhero (Employee)
Forum|alt.badge.img+20
  • Superhero (Employee)
  • 697 replies
  • June 12, 2020

I tried in latest - UPD17. If you can tell me your UPD version, I can check in that version too.


pwlm
Hero (Partner)
Forum|alt.badge.img+11
  • Author
  • Hero (Partner)
  • 77 replies
  • June 12, 2020

We are on UPD13 - thanks @Rusiru !


pwlm
Hero (Partner)
Forum|alt.badge.img+11
  • Author
  • Hero (Partner)
  • 77 replies
  • Answer
  • June 18, 2020

@Rusiru.

I have solved this very simply - the Create XML checkbox in the Report Definition for INVENTORY_PART_BARCODE_REP was unchecked!

Now checked!