Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Sorting an Array
Author
Message
ajmufic
Newbie
Joined: 28 Aug 2008
Online Status: Offline
Posts: 20
Topic: Sorting an Array
Posted: 15 Apr 2010 at 4:36am
Is there an easy (or hard) way to sort an Array in Crystal Syntax?
IP Logged
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 16 Apr 2010 at 4:35am
probably any sort algorithm you want, but there are limits to the arrays, only 1d. Can use loops and swap values to sort.
something like this should swap:
if arr[x]<arr[y] then (
temp := arr[y];
arr[y] := arr[x];
arr[x] := temp;
);
look up loops, and you will probably want a flag that a swap has occurred, so when none are performed, you know that you are done.
HTH
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 16 Apr 2010 at 4:43am
Bubble sort probably would work. I haven't done one in a few years (okay, a lot of years).
IP Logged
joelum
Newbie
Joined: 11 Nov 2010
Location: United States
Online Status: Offline
Posts: 1
Posted: 11 Nov 2010 at 10:11am
See my PPT presentations using bubble sort algorithm at
http://www.sfarea.org/12201.html
For arrays under 445 rows, see Nov 2008 meeting (easy)
For arrays from 1 to 1000 rows due to 99,999 loop limitations,
see Oct 2010 meeting (hard but rigorous)
Edited by joelum - 11 Nov 2010 at 11:02am
joelum
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.