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

Group selection formula in Crystal.NET

Status
Not open for further replies.

danal13

Programmer
Feb 17, 2004
17
US
hi,

I am looking for sytax for multipal selection in group name.
Something like this:

{group name 1} in "USA,Canada"

Thanks,
 
You could use:

GroupName({your.groupfield}) in ["USA","Canada"]

But I think it is more usual to just use the group field itself as in:

{your.groupfield} in ["USA","Canada"]

...which could be used in the record selection formula or the group selection formula.

-LB
 
Thanks for your respond. I'm trying to use seggested code and it doesn't work:

GroupName ({Command.SiteName}) in ["DC Hospital","NYC Hospital"]
 
You would only be able to use this in the group selection formula area, which you indicated you wanted to use in the heading of your post, and if you had already created a group on {Command.SiteName}. Go to report->edit selection formula->GROUP and enter the formula there.

If this doesn't work, then instead of saying that it doesn't work, please provide the error message that you get or explain the results you get.

Again, why not create a record selection formula:

{Command.SiteName} in ["DC Hospital","NYC Hospital"]

You could put this in the regular record selection formula area. Or if you want the ability to select sitenames each time you run the report, use a parameter instead.

-LB

 
Report does'not generate any error and dislays all data.
I used record selection insted of group and gat the same result

Thanks,
 
Please post your entire record selection formula by copying it into this thread. Your results do not make sense to me.

-LB
 
I'am using Crystal.NET. I removed formula from the report
and added code to the application:

crystalReportViewer1.SelectionFormula="{Command.SiteName} in ['DC Hospital','NYC Hospital']";

Everything is OK right now.

Thanks for your time and syntax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top