I can use the following line to link 2 table in SQL: "htrans.servcode[1,3] = immun.immtype[1,3]". This statement looks for the first 3 characters in each field to match instead of the entire field. Is there a way to do this in Crystal? Thanks, Rich
If you use a command, you could write it like this:
select htrans.field, htrans.immtype
from htrans inner join immun on
{fn left(htrans.servcode,3)} = {fn left(immun.immtype,3)}
Or you might be able to do this without the {fn }, and just use:
select htrans.field, htrans.field
from htrans inner join immun on
left(htrans.servcode,3) = left(immun.immtype,3)
...depending upon your datasource. The punctuation/syntax is datasource dependent as well.
You could alternatively manage this by using a subreport where you create a formula using the left() function and then link it to the corresponding formula in the main report in the subreport linking screen.
Sorry for the delay in getting back to you. I've been a little swamped and this had to take a back burner. I just figured out that SQL's could go in a command. I have a little background with SQL and I'm just learning CR. That did the trick. The sub-report is over my head for right now, but I will look into that when I have time.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.