Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

If a field is NULL, replace with another field. How to do it?

1011308May 28 2013 — edited May 29 2013
Lets assume that there are four fields, and I placed each field below or at the bottom of other fields, just like the following:

Field_1
Field_2
Field_3
Field_4

Just take Field_2 as example. If Field_2 is NULL, my report will display the following:

Field_1

Field_3
Field_4

I would like to make that if any of the fields are NULL, the NULL field will be hidden and the which is not NULL below the NULL field will replace the NULL field and be placed at the same location as the NULL field.

For example, lets say if only Field_2 is NULL while other fields are not NULL, then in the report, while the location of Field_1 will not be moved, Field_2 hidden, Field_3 replace the Field_2 and moved to the position of Field_3, and Field_4 will be moved to the original location of Field_2, just like the following:

Field_1
Field_3
Field_4

If only the first field, Field_1 is NULL while other fields are not NULL, Field_1 will be hidden and the Field_2 which is not NULL will be displayed at the location of Field_1, like follows:

Field_2 <-- original location of field_1
Field_3 <-- original location of field_2
Field_4 <-- original location of field_3

If both Field_2 and Field_3 are NULL, the other fields should be displayed like follows:

Field_1
Field_4 <-- original location of field_2

How to make this happen?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2013
Added on May 28 2013
6 comments
989 views