cancel
Showing results for 
Search instead for 
Did you mean: 

How to display results from 2 places if not found

Former Member
0 Kudos

HI I have a report for medical providers. They have an ID number, known as NPI. I have located a table that has this NPI # but for some it does not have. I have a sub report that goes and gets this number. I cannot update this table.

So for those not having, i made a hard coded formula for now.

How do I tell the sub report to only place the result if it finds one, otherwise let's use the hard coded value from the formula?

Or can I do this in the sub report ? How would you code the record select ?

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Paul,

If this formula is inside the Subreport, modify it so that it looks for NULL values:

IF {ID} = '' then

'123456'

else

{ID};

Make sure the formula is set to use 'Default Values for Nulls'.

-Abhilash

Answers (1)

Answers (1)

ido_millet
Active Contributor
0 Kudos

Assuming you are using a shared variable to pass the value from the subreport to the main report, reset that shared variable in a main report formula on (or before) the section where the subreport is placed.

By the way, consider using a SQL Expression (instead of a subreport). For even faster performance, you can also use the approach described here: Another option for sharing arrays