Link to home
Create AccountLog in
Avatar of pelican45
pelican45

asked on

How do I build an array from database fields?

I'm urgently seeking a tutorial that will give me a mid-level knowledge of using arrays in Crystal.  What I need immediately is something to guide me through assigning values from a database field to a specific location in an array that is initialized with four blank elements.  If database field = 'PRINT' then Array [1] := 'PRINT' else (leave Array [1] blank).  If database field = 'FAX' then Array [2] := 'FAX' else (leave Array [2] blank).  And so on.

Thanking you in advance,

BC
ASKER CERTIFIED SOLUTION
Avatar of David VanZandt
David VanZandt
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of pelican45
pelican45

ASKER

DVZ,

If I go the way of the 1st example, I then get a string variable that might look like ('PRINT','{blank}','{blank}','FAX').  Right?

Is this literally an array? Or is it just a string?   How do I examine element [1, 2, 3 or 4] to see what's in it (which is what I need the array for)?  If stringvar[1] = 'PRINT' then thus and so?

Thanks,

Pelican45