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

Need to use multi-value parameter to pull results from a text field

Status
Not open for further replies.

CanadianDesigner

Technical User
May 28, 2008
13
CA
Firstly, I am using Crystal Reports 11. My problem is I need to use a multi-value parameter to pull results based on a text field. The other problem is that multi-value parameter has to allow for custom values.

For example, I am asking the report user to tell which countries they want to see results from and they would enter multiple countries (ex. Canada, USA, Germany, etc.)

However, the field I need to use to pull the results from is a text field that has no standardized data, the field value could be something like "Argentina,Germany,Australia" in which case I would want it to show up because the user chose Germany, but the field may have loads of other data in it.

Ideally, I would also like to be able to group these results based on the parameter entries (not by the field results), so if you can advise as to the easiest way to do that as well, that would be great.

Please let me know if this is unclear and requires more explanation. Thanks in advance for your help!
 
create this formula
//yourformulaname
numbervar a := ubound({?yourparameter});
numbervar b;
numbervar c := 0;
for b := 1 to a do
(
if instr({yourdatabasefield},{?yourparameter}) > 0 then c := 1
);
c

in record selection
{@yourformulaname} = 1


As for the second part I dont see a way to group based on your parameter entries. You could of course group on {yourdatabasefield}

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top