Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing a value

Status
Not open for further replies.

martinjt

Technical User
Aug 1, 2008
34
US
How do I capture a value in the main report so that I can compare it to values in a subreport? For instance, one name type (lets call it NT1) has a Full Name value of Mr. and Mrs. John Smith. This is the value that is in the main report page header.

I then have next on my subreport:

Name Type First Name Full Name
NT1 Jon Mr. and Mrs. John Smith
NT2 Jon Jon Smith
NT3 Jonny Mr. Jonny Smith
NT4 Mary Mary Smith
NT5 Jon and Mary Jon and Mary Smith
NT6 Mary Mrs. Mary Smith

I have grouped by First Name so that I only have one value of each showing since my goal is to capture a spouse or cross reference name but now I need to supress names that are already showing in NT1 (the page header). So in this case, each Name Type/First Name combo would be compared to the string "Mr. and Mrs. John Smith". I imagine I would use the
inStr(str1,str2)
function but I'm unable to capture the text string to be searched (str1). I can't seem to find the right variable/eval time combination to do it.

My ultimate goal is to list only the first name(s) that don't already appear in NT1. So again, in this case, only "Mary" and "Jonny" would come up in the subreport.

And just so you know, I can't just use one particular name type (such as spouse name) because of inconsistencies in the data. Different name types have been used over the years for this function. Ugh...

Any help would be greatly appreciated and let me know where I'm not clear...

Thanks,

JT



 
Sorry, there should be no "h" in any of Jon's names above. So, only Jon or Jonny...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top