Notices


Reply
 
LinkBack Thread Tools Display Modes

Old 01-23-2008, 03:24 PM   #1 (permalink)
BUS Driver

Peter Gulka's Avatar

Join Date: May 2006
Location: Winnipeg, MB, Canada
Posts: 1,638
Rep Power: 4 Peter Gulka is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Blackbaud Analytics/Researcher's Edge (BBA/TRE)
- API/VBA

How to parse text in CR XI?

I'm in a tough spot. I have 4 pieces of data that I need to track on a gift record. I had been doing it in 2 attributes, but recent events have rendered that solution impossible.

I need to track some information on specific scholarships that theese gifts are funding. The attributes were tracking:

- quanity of the award
- award name
- award description
- award amount

I need to do this in one place so that when multiple awards are used the order of the attributes does not affect the report generation.

Once idea was using '3@1500' to represent the number of awards and their value. I would then need to parse out the 3 and 1500 seperately in formulas so I could use them as distinct values.

Any ideas?
__________________
Peter Gulka
Chief Bus Driver
Blackbaud User Society
www.blackbus.org

Follow me on Twitter

View Peter Gulka's profile on LinkedIn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-23-2008, 03:40 PM   #2 (permalink)
BUS Driver

Peter Gulka's Avatar

Join Date: May 2006
Location: Winnipeg, MB, Canada
Posts: 1,638
Rep Power: 4 Peter Gulka is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Blackbaud Analytics/Researcher's Edge (BBA/TRE)
- API/VBA

hmm... this seems to work. I think...

Code:
//assuming a format of 2@1500
// - 2 awards
// - $1500 each
 
//gets the number of awards
left({attribute_field},instr({attribute_field},"@")-1)
 
//gets the award amount
right({attribute_field},(Length ({attribute_field})-instr({attribute_field},"@")))
__________________
Peter Gulka
Chief Bus Driver
Blackbaud User Society
www.blackbus.org

Follow me on Twitter

View Peter Gulka's profile on LinkedIn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-23-2008, 04:15 PM   #3 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

That will probably work, but it's easier to use the Crystal Split function which has four variants. So in your case you could use Split({attribute_field}, "@"). Split returns an array of the substrings.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-23-2008, 04:48 PM   #4 (permalink)
BUS Driver

Peter Gulka's Avatar

Join Date: May 2006
Location: Winnipeg, MB, Canada
Posts: 1,638
Rep Power: 4 Peter Gulka is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Blackbaud Analytics/Researcher's Edge (BBA/TRE)
- API/VBA

RE: How to parse text in CR XI?

hmmm... but my formula can't return an array, so what do I do with it then?
__________________
Peter Gulka
Chief Bus Driver
Blackbaud User Society
www.blackbus.org

Follow me on Twitter

View Peter Gulka's profile on LinkedIn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-24-2008, 08:34 AM   #5 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

You just pull whichever pieces you need out of the array and return those. You may need multiple formulas if you need to return the pieces separately.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
parse, text


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Cheap Gas - Cheap Gas - Internet Marketing - Credit Counseling
All times are GMT -6. The time now is 04:06 AM.

Miscellaneous


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel Team 2008 :: jvbPlugin R1012.364.1

SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger
Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64