Page 1 of 1
Switch table name on the fly.
Posted: Wed Dec 22, 2004 11:19 am
by Sam_(Guest)
We are a Visual Foxpro 8.0 shop. We use R&R for some of our reports.____We are trying to have R&R look at another table other then the one that is in the setup dialog box by creating the config file on the fly coded in Visual Foxpro.____We have one master table and one child table. Switching the child table is what we are interest in.____Do we need to use the ri_* variable? If so, we are familiar with ri_master, but what ri_* variable do we use for the child table?____any help/hint is appreciated.____Thank you
=> RE: Switch table name on the fly.
Posted: Wed Dec 22, 2004 3:40 pm
by kfleming
To change a related table you would use one of the RI_ALIASnn fields.__In this field you enter the alias name that is used for the related table you want to switch and then an equals sign. After the = you enter the path/name of the new related table, then the new related index and then any index tag.____For example:__ORDFILE=C:ORD2004CUSTORD.DBF,C:ORD2004CUSTORD.CDX,CUSTNO____The syntax is described in the Help file.____Kathleen__R&R Support
==> RE: Switch table name on the fly.
Posted: Wed Dec 22, 2004 4:47 pm
by Sam_(Guest)
>To change a related table you would use one of the __>RI_ALIASnn fields. __>In this field you enter the alias name that is used for the __>related table you want to switch and then an equals sign. __>After the = you enter the path/name of the new related __>table, then the new related index and then any index tag. __>__>For example: __>ORDFILE=C:ORD2004CUSTORD.DBF,C:ORD2004CUSTORD.CDX,CUSTNO __>__>The syntax is described in the Help file. __>__>Kathleen __>R&R Support ____Thanks Kathleen.____When you say RI_ALIASnn field, what is RI_ALIASnn referring to?__How do I know what "nn" is?__Does you example belong in a config file somewhere?__
===> RE: Switch table name on the fly.
Posted: Thu Dec 23, 2004 8:48 am
by kfleming
The fields you can use are RI_ALIAS1, RI_ALIAS2,...RI_ALIAS99____Kathleen__R&R Support
====> RE: Switch table name on the fly.
Posted: Thu Dec 23, 2004 5:27 pm
by Frazkrer
Sam and I have tried the following line in the text control file we are specifying in the call to RRWRUN:____table1 = x:data able2.dbf,x:data able2.cdx,tagname____Table1 is actually the 3rd table referenced in the Relations dialogue when designing the report.____Or problem is this report is being run in a multiuser environment and must be able to pull data from different tables each time or even simultaneously when run by different users. Therefore, using fields in a control table is not an option for us.____We know we are utilizing the text contol file properly because we are using it to specify the report name and are successfully changing the master table by using ri_master = x:dataNewMaster____Any help would be appreciated. The boss is getting testy!____
=====> RE: Switch table name on the fly.
Posted: Fri Dec 24, 2004 8:04 am
by kfleming
If each user would need a separate table you would need a separate control file for each user.____Kathleen__R&R Support
======> RE: Switch table name on the fly.
Posted: Mon Dec 27, 2004 10:55 am
by Frazkrer
We are using FoxPro to create a separate control file for each user before it calls the report. This is an example of the text in the control file that is not working:____ri_report = H:k12004data 4K12.RRW__ri_master = H:k12004datak1cap2__ri_printer = ?__k1foot=H:k12004datak1foot2,H:k12004datak1foot2.cdx,XKFPCSYQ____It calls the 04K12 report as specified. It uses K1cap2 as the master table instead of K1Cap. However, it does not use K1Foot2 in place of K1Foot. The report runs and pops up the screen, asking the usr Screen, Printer, etc.____Thanks for your help,____Susan
=======> RE: Switch table name on the fly.
Posted: Mon Dec 27, 2004 12:38 pm
by kfleming
You need to edit the k1foot line to read:____RI_ALIAS1=k1foot=H:k12004datak1foot2,H:k12004datak1foot2.cdx,XKFPCSYQ____Kathleen__R&R Support
========> RE: Switch table name on the fly.
Posted: Mon Dec 27, 2004 3:00 pm
by Frazkrer
That did it.__Thanks!