Home > Archive > Visual Basic Crystal Reports > January 2006 > Records Selection
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Shelby 2006-01-22, 10:00 pm |
| Hi,
Is it possible to achieve something like this:
{item.SalespersonCode} in ('12', '25', '30')
Thanks.
Shel
| |
| Jay Taplin 2006-01-22, 10:00 pm |
| Yes, most definitely. Are you talking about doing it through code (via
parameters), or hard-coding it into the report itself?
If via parameters... on the "Create Parameter Field" window, check the
"Allow multiple values" check box. In the "Select Expert", create the
criteria of "{Item.SalesPersonCode}" equal to your parameter
("{?SalesPersonCode}" for the purposes of this example). Then, when
assigning a value to the parameter from code, do the following:
mReport.Report.ParameterFields.Item("{?SalesPersonCode}").AddCurrentValue 12
mReport.Report.ParameterFields.Item("{?SalesPersonCode}").AddCurrentValue 25
mReport.Report.ParameterFields.Item("{?SalesPersonCode}").AddCurrentValue 30
If you are hard-coding this into your report, go to the "Select Expert" and
create the criteria of "{Item.SalesPersonCode}" "Is One Of" and type in 12
and click Add, 25 and click Add, 30 and click Add.
Best of luck. If you need more help or further clarification, post back!
Jay Taplin MCP VB
|
|
|
|
|