You will have to use either a command that uses a function like mid() that works with your datasource to link the tables in the from clause, e.g.,
from table1 inner join table2 on
mid(table1.`field`,11,5) = table2.`field`
Or you can add one table in a subreport and then link the subreport to the main report by linking the formula to the field in the other table.
-LB