Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link result of formula to table

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
GB
I am using CR XI

I am stripping out an account code from some data. The resulting code should also be in another table which I need to link to in order to retreive the codes name. How can i link the result of a formula to a field in another table?
 
Crystal gets table data first and then evaluates tables. You could pass your value to a subreport, but that would take a long time if you did it at detail-line level.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
You can either use the subreport approach where you link the subreport on the formula field, or you could create a command to use as your sole datasource where you build the formula into the linking in the from clause, as in:

select table1.field1, table1.field2, table2.field1
from table1
inner join table2 on
left(table1.acct,4) = table2.acct

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top