Skip to content

In Report Designer, is there a way to express a simple 'use this field if it has a value, otherwise fall back to that field' condition, similar to SQL's NVL(CV_PART_NO, SO_PART_NO)?

Answer

Use the strIFF function in Report Designer's function editor: vldtstr:strIFF(string-length(tns:CV_PART_NO), tns:SO_PART_NO, tns:SO_PART_NO, tns:CV_PART_NO). This checks whether CV_PART_NO has any actual length, non-empty, and returns SO_PART_NO if not, or CV_PART_NO if it does, achieving the equivalent of NVL(CV_PART_NO, SO_PART_NO) purely within Report Designer's own expression syntax, without needing a database-level change.

← Browse Reporting and analytics questions