Link to home
Start Free TrialLog in
Avatar of HackLife
HackLife

asked on

Crystal Reports

In Crystal Reports, i'm trying to take an entry in a database table and split it into multiple cells. I've successfully used split() to break the data into an array, but how do I stretch it to independent entries? Can I take individual parts of the array and link it to another table?

Example data:
RABCDEF  RGHIJKL  RMNOPQR

All are separated by a space. I used split({table.column}," ")  and then what else?
Avatar of JamesPMCD
JamesPMCD

Here's one I just used.

I have a string field that stores a set of data extracted from a table as one string.
I have a set of three sub string I used to determin what position the breaks will be at and then I extact it into variables that I display through functions.

You could uses the same routine looking for the spaces.

'*******************************************************
NumberVar xPos;
NumberVar xPosD;
NumberVar xPosS;

SHARED StringVar xDesc;
SHARED StringVar xSerial;

xPos := instr(1,{fil_MRPOverRides.rsFields},"Desc :",1);
xPosD := instr(1,{fil_MRPOverRides.rsFields},"rowID :",1);
xPosS := instr(1,{fil_MRPOverRides.rsFields},"Serial :",1);

if xPosS > 0 then
    (
    xSerial := "  " & replace(mid({fil_MRPOverRides.rsFields},xPosS, len({fil_MRPOverRides.rsFields})),"serial : ","");

    xSerial := mid(left(trim(xSerial),len(trim(xSerial)) -1),5) ;

    if xPos > 0 then
        (   xDesc := replace(mid({fil_MRPOverRides.rsFields},xPos,XPosD - xpos-1),"Desc : ","") ;
        );

    trim(replace(xDesc,xSerial,""))  
    )
else
"";
'*************************************************************************
Avatar of HackLife

ASKER

Here's another example of what I'm trying to do:

table1:column1

abc def
abc def ghe
ghe
abc
abc ghe


table2:column1

abc me@me.com
def me2@me2.com
ghe me3@me3.com


I need to get the emails in table2 linked to each 3 letter indicator in table 1. The problem is that table 1 contains a bunch lumped into one cell.
ASKER CERTIFIED SOLUTION
Avatar of JamesPMCD
JamesPMCD

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
how do you link?
That a little more fun.

Running this array in a sub report you can create a table. then link back to the main report using the formula
Interesting... i'll have to give it a try. thanks