I have a report that I am trying to do 2 things with.
I want to look at a set of records and if any of the records meet my criteria, I want to return a "True" string ("EHR" in this case). I am running into 2 problems.
When I use a formula in the main report I run into a problem with unintentionally limiting the overall output to just those records that have an entry in another table (PHY_ADVISOR):
IF ISNULL ({PHY_ADVISOR_AH.CONTACT_ID}) THEN "" ELSE
IF {PHY_ADVISOR_AH.ADVISOR} in ["EHR"] THEN "EHR" ELSE ""
So, my solution is to put this in a subreport which works fine...sort of.
The subreport is causing the overall report to run very slowly. Also, when it returns the value, it brings all values where the condition is met. I want it to only return one True (i.e. "EHR") if ANY of the records contain that string. I have already tried "=" instead of the "in" statements with no change in outcomes.
So, my two questions are:
1. How do I return only 1 True statement regardless of how many records contain the target string?
2. How do I move this out of a subreport and into the main report without limiting the overall record sets to just those records with a Physician Advisor record?
Thanks.
Edited by dpanders - 12 Jul 2013 at 4:42am