Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting Records 1

Status
Not open for further replies.

ganjass

Technical User
Dec 30, 2003
154
GB
CR10
Progress

Hi ALL,

I have 2 tables A and B for a report. In Table A there is Acc No for primary key. In table B There is an array field that holds various values. There is One array field for every AccNo. The table joins have to be left outers. I want to split the array field, which is easy enough, and display All the deatails associated with each AccNo eg

AccNo X Array Field
1234 Y [12344,2345,5678,890]

I want to display

1234 Y 12344
1234 Y 2345
1234 Y 5678
1234 Y 890

and for every field that has values in the array field.

thanks in advance
 
What is the maximum number of entries you expect to have in the array for a given record?

- Ido





CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
roughly speaking no more than 5

cheers
 
Here is a formula that you can use in your detail section:
Code:
stringVar part1 := {table.accno} & chr(9) & {table.Y_value} & chr(9);
stringVar array list := split({table.array_field},",");
numberVar i;

for i := 1 to ubound(list) do
    (list[i] := part1 + list[i]);

join(list,chr(13));

Place in your detail section;
Right click the formula and choose format field.
Under the Common tab, select Can Grow property.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top