Defining Linked DBF On Report Run

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Cheryl_(Guest)
Posts: 1
Joined: Tue Oct 10, 2017 12:44 pm

Defining Linked DBF On Report Run

Post by Cheryl_(Guest) » Thu Feb 02, 2006 11:20 am

I have an instance where I need to define one of the linked databases at report run time. The master database will stay the same.____For example:__Master dbf: MDBF__Linked Field: Vendor____So, if MDBF->Vendor begins with a letter A, then I want to link the MDBF database to SUBA.DBF. But, if MDBF->Vender begins with a letter C, I want to link to SUBC.DBF. I would like to do this as the data in the MDBF changes (but I can live with a one-time link).____Can this be done?__

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> Defining Linked DBF On Report Run

Post by kfleming » Thu Feb 02, 2006 2:07 pm

You could create a calculated field with the CLOOKUP() function as long as you will have a full exact lookup relation to the related table and want to bring back a character field from the related table.____For example:__CLOOKUP(CUST_NO,"COMPANY","C:DATASUB" LEFT(MDBF->Vendor,1)__ ".DBF","C:DATASUB" LEFT(MDBF->Vendor,1) ".CDX","CUST")__ __Uses the field CUST_NO from the current composite table find the matching CUSTNO in the SUBx.DBF using the cust tag in SUBx.CDX to return the value of the Company field where the x in SUBx.DBF is the first letter of the MDBF->Vendor field.____Kathleen__R&R Support

CherylABellucci
Posts: 4
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Defining Linked DBF On Report

Post by CherylABellucci » Thu Feb 02, 2006 2:23 pm

I know, that^s the problem. I want to bring back an image from a memo field. I don^t think that fits into the scope of CLOOKUP.__

PrestonTam
Posts: 0
Joined: Sat Apr 21, 2018 4:10 pm

=> Defining Linked DBF On Report Run

Post by PrestonTam » Mon Feb 06, 2006 8:16 am

Cheryl,____If you have only small number of vendor tables (e.g. SUBA.DBF, SUBB.DBF and SUBC.DBF) then maybe you can link to all of them and only reference the one you need using a calculated field to select it.____Rob__Plan-Be

Post Reply