Crystalkeen logo; we offer Crystal reports viewers and schedulers
 
Crystalkeen header image 3
Crystalkeen header image 5

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  

Articles:
Administration
Advanced
Basic
Database
Financial

Tools:

Analyzers
CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs



 
 

Add'l:
About us

Contact Us
 

CrystalReports
on Steroids

Crystal Reports:
Display array values better with "Join" and "Split" functions

Consider this formula:

Join ({?Country}, ", ") // array, delimiter

If the {?Country} parameter contains the values ["Australia", "New Zealand", "Hong Kong"] the result of this function will be "Australia, New Zealand, Hong Kong".

The split function can be used to perform the opposite result: taking "Australia, New Zealand, Hong Kong" and returning an array. This would be used to pass a multi value parameter to a subreport.

1) Create a formula to join the list together (as described earlier)

2) Link that formula to a single value string parameter in the subreport

3) Modify the record selection formula in the subreport (with the split function) to:

{Customer.Country} = split({?Pm-@Country List}, ", ")

 

Can you think of a few uses for this?

A somewhat related topic is "Keep Together."

See: Keep Together--But Only When You Want To

 

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.

Authorship

Except where an author's name is given at the start of the article, all of these articles were written by Mo Naughton or Bruce Ferguson and edited by Mark Lamendola. Mo is a Crystal Reports consultant, trainer, and developer for Chelsea Technologies, Inc. Bruce Ferguson is a Crystal Reports consultant, trainer, and developer for CrystalKiwi, Inc. Mark Lamendola is a writer and editor with over 15 years experience in professional and trade publications.

 

  • Questions? Please write to mark@crystalkeen.com. We do want your business.
  • Do you have your own tips for Crystal Reports administrators and designers? Write to mark@crystalkeen.com and we'll post your tips with a link to your Website (or with some other attribution if you choose).
  • Crystal Reports is a subsidiary of Business Objects, which is owned by SAP.