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!

Matching Records from Dynamic Parameter - Crystal XI 1

Status
Not open for further replies.

JAQ123

Programmer
Aug 16, 2010
2
US
I have a Dynamic parameter that allows users to select multiple options in my paramter.

What I need to accomplish, is to list all records in my options field and be able to count how many matches for each order based the the options that were selected in the parameter.

For example, order #123 has option a,b,c,d,e,f,g. order# 124 has option a,c,g and order# 125 has option h
(Parameter options selected - a,b,d,g)

My resuls would be:
Order #123 - list all options 4 matches so will list first
Order #124 - list all options 2 matches will list second
Order #125 - Will not display
 
Not sure how you want to display the options per order, but if you insert a group on order#, and then add the options field to the details, you can then add a formula {@match} like this:

if {table.option} in {?Options} then 1

Then right click on this formula and insert a sum on it at the group level. Then go to report->group sort->select "sum of {@match} as your group sort field->descending. You can also add a group selection formula(report->selection formula->GROUP and enter:

sum({@match},{table.order#}) > 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top