I think you are trying to create a field to use as a link between the tables.
I still will suggest that there is already a link in the DB to accomplish this much easier. If there was not then the ERP would not be able to create the calculated field because it could properly link itself to the customer data.
Sometimes you need to use intermediate tables to get to what you want.
Like a customer table to an order to a bill table to a payment table.
In this example, perhaps the customer id is only attached to the customer and the order tables but you want to show the customer name and payments. You still join (daisy chain) all 4 tables as needed and only use fields from the customer and bill tables.
it is possible to do what you want but consider using a command object to create the field you want (the concatenated name) and then use that as a join to {ShipHead.Calc_BilContct}
This is still risky as any like names will join and you will get multiple emails results that would be incorrect.
Your current approach of doing this in the report only can be done but it would be brutal on the resources.
I assume you did not link the two tables in the report source. Therefore you will get a Cartesian data set from it.
You can then use a filter to remove rows using a select statement similar to your if-then formula above.
Or you can go the route of the sub report and use a formula field to link on from main to sub report.
All of these options still are risky and I think making a simple process more complicated than it needs to be. However, I do not know your data set so
if you cannot find a proper table join to get the data set you need if you want to choose one of the above approaches we could walk through it.
Edited by DBlank - 17 Jan 2014 at 4:27am