|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Split a StringThis was an interesting question on Tek Tips (www.tek-tips.com) recently. The data in the field looked like…
The request was to extract the values from between the quotes. After several approaches the simplest solution was to use this formula to extract the first value.
And the second value was extracted with
The way this works is to split the field into a string array using the quote delimiter. Then the first member of the array is the value prior to the first quote, and can be ignored. The first formula then returns the second value in the array. The third value in the array is the value between the two quoted values and the fourth value in the array is the second quoted value and is returned by the second formula. Thanks CoSpringsGuy for an interesting solution to a complicated problem. An even better solution to the long string problem is to rethink the report. If your report is displaying long strings, then probably your report design focus has been on presenting data rather than meeting the information needs of the report user. Unfortunately, most people don't really read anymore. If they see a long data string, they'll visually scan past it. It's just meaningless clutter on the page, for them. You may think your highly-paid executives are mulling over critical business information, carefully digesting what they read so they can make solid business decisions. But that is seldom the case in any organization. Executives lead fragmented work days, and the higher up the chain they are the more this tends to be true. It does work against their effectiveness, but that issue doesn't cause them to change their behavior. They react, instead of respond, to the many demands placed on them. You can help these executives by crystallizing the information they need. Crystal Reports isn't meant to just reformat data, but to crystallize information. Make that fact your driving principle behind your report design. So rather than toss that long string out there, ask "What does that long string represent?" It's the representation you want the report to convey to the reader. Not the actual data. Some research tips:
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. |