BusyBee2012
IS-IT--Management
Hello Everyone,
I have a rather complex Crystal Reports array/formatting issue. Any support is greatly appreciated, my patch work code is quite flawed at the moment. This was orginally completed in 1995 with a much older version of Powerbuilder/Crystal Reports Syntax. I am reformatting using CR8 /Crystal Syntax . My report currently returns 2000 records, based on future date parameters this will be reduced. The fields displayed are:
id
name
Priority#10-50 ...
block#0,1,2,3 ...
dates (to and from)
location
repname
The report is group in the following order :
1 - location
2 - repname
3 - dates
So output looks like:
Ontario
Harrison
Oct 10 to 20
1248389 Mary 10 ,1
1248392 Sarah 20,1
1248393 George 30,1
1248394 Max 40,1
1248399 Harry 50,1
And repeated for each unique grouping, the output I need to see is:
Ontario
Harrison
Oct 10 to 20
1248389, 1248392 to 1248394, 1248399 Mary & Others
The priority numbers 10 - 50 tells me that these id's are related, and block number tells me they can all appear on the same line. However if the block number were different for each id the output would look like:
Ontario
Harrison
Oct 10 to 20
1248389 Mary (this block number would be 1, resulting in priority number 10)
1248392 to 1248394 Sarah & Others (these block numbers would be 2, resulting in priority numbers 20-40)
1248399 Max (this block number would be 3, resulting in priority number 50)
I am working within the constraints of the current system logic. The following code gets me the id's but nothing else such as the sorting suggested by the comments:
local stringvar array myList:={id}; //load the array
Local stringvar temp;
local numbervar i;
local numbervar j;
for i:= 1 to count(myList)-1 do //First loop of the ripple sort
for j:= 1 to count(MyList)-i-1 do //second loop
if MyList[j] > MyList [j+1] then ( //Out of order - swap them
temp := MyList[j];
MyList [j] := MyList [j + 1];
MyList [j+1] := temp;
join(mylist,", ")
Any thoughts please?? Thank you!!
I have a rather complex Crystal Reports array/formatting issue. Any support is greatly appreciated, my patch work code is quite flawed at the moment. This was orginally completed in 1995 with a much older version of Powerbuilder/Crystal Reports Syntax. I am reformatting using CR8 /Crystal Syntax . My report currently returns 2000 records, based on future date parameters this will be reduced. The fields displayed are:
id
name
Priority#10-50 ...
block#0,1,2,3 ...
dates (to and from)
location
repname
The report is group in the following order :
1 - location
2 - repname
3 - dates
So output looks like:
Ontario
Harrison
Oct 10 to 20
1248389 Mary 10 ,1
1248392 Sarah 20,1
1248393 George 30,1
1248394 Max 40,1
1248399 Harry 50,1
And repeated for each unique grouping, the output I need to see is:
Ontario
Harrison
Oct 10 to 20
1248389, 1248392 to 1248394, 1248399 Mary & Others
The priority numbers 10 - 50 tells me that these id's are related, and block number tells me they can all appear on the same line. However if the block number were different for each id the output would look like:
Ontario
Harrison
Oct 10 to 20
1248389 Mary (this block number would be 1, resulting in priority number 10)
1248392 to 1248394 Sarah & Others (these block numbers would be 2, resulting in priority numbers 20-40)
1248399 Max (this block number would be 3, resulting in priority number 50)
I am working within the constraints of the current system logic. The following code gets me the id's but nothing else such as the sorting suggested by the comments:
local stringvar array myList:={id}; //load the array
Local stringvar temp;
local numbervar i;
local numbervar j;
for i:= 1 to count(myList)-1 do //First loop of the ripple sort
for j:= 1 to count(MyList)-i-1 do //second loop
if MyList[j] > MyList [j+1] then ( //Out of order - swap them
temp := MyList[j];
MyList [j] := MyList [j + 1];
MyList [j+1] := temp;
join(mylist,", ")
Any thoughts please?? Thank you!!