I have created a parameter for the end user to enter 1 or more names that they wish to see highlighted within a report. Using that parameter, I wrote the following conditional formatting coding:
if UpperCase ({?DrHighlight}) in {CASE.SURGEON_TEXT} then Color (255,255,125) else no color
I quickly figured out that I had to add the [] array constraints to it and adjusted it to this:
if UpperCase ({?DrHighlight}[1]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else nocolor
I then realized that it would now only highlight the first listing in the array as it is. I added additional IF THEN statements up to ({?DrHighlight}[10]) figuring we would not have to highlight more than that at a time (we will probably never need more than 5, but would rather be safe than sorry...)
if UpperCase ({?DrHighlight}[1]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[2]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[3]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[4]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[5]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[6]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[7]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[8]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[9]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
if UpperCase ({?DrHighlight}[10]) in {CASE.SURGEON_TEXT} then Color (255,255,125) else
nocolor
I then discovered the "A subscript must be between 1 and the size of the array" error...
I understand WHY it is doing it, but am still unclear as to how to fix it. I have read a couple things about UBOUND() but I am not sure that is what I need and don't completely understand how it works...
If anyone has any ideas, I would greatly appreciate them.
Thanks,