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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Arrays 1

Status
Not open for further replies.

RobbieB

Technical User
Apr 25, 2003
215
US
Are Dynamic Arrays supported in Version 9.0? Or any version for that matter? I am on Windows XP running version 9.0 against a SQL database and have a sub report where I am trying to say " if a person has purchased more than one item and one of the items is "X" and one of the other items is "Y" then 1 else 0. Any ideas? Was I on the right track with trying to creat a dynamic array or is there another way? Any input on this would be greatly appreciated.
 
You might want to show examples rather than trying to describe the data with terms such as "a person has purchased more than one item and one of the items is "X" and one of the other items is "Y" then 1 else 0." Are these items different fields, or different rows, or?

Try posting:

Database/connectivity used
Example data
Expected output

-k
 
Historically I have but there are som many formulas at work here I thought it would get way to confusing so I thought I would take this approach. I will re-post with the incredibly confusing version when I have time. Thanks
 
Well, in either case, you should udnerstand that your phrasing is ambiguous, using terms such as one field in a row is X, and the same field in another row is Y would be descriptive, using non technical terms like "item" does little to describe your environemnt nor requirements, and rephrasing using technical terms doesn't take any longer than what you've done thus far.

-k
 
Robbie,

Assuming the items are from the same field, and that you want to test the presence of both items within some group, one approach is to create two formulas like:

//{@X}:
if {table.item} = "X" then 1

//{@Y}:
if {table.item} = "Y" then 1

Then go to report->selection formula->GROUP and enter:

sum({@X},{table.groupfield}) > 0 and
sum({@Y},{table.groupfield}) > 0

-LB
 
Again, I'm sorry synapsevampire. What else can I say.
LB, thanks for the input. It worked GREAT. I created the formulas you suggested and left off the Group Selection formula for my needs, passed the numbers to the main report with a shared variable and it works perfectly. thanks again, you rule!
 
Nae worries, Robbie, LB figured it out.

I'm a hopeless geek, and usually won't guess unless someone supplies documentation here, or at the office.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top