Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FRX2Word and different paths
Message
De
02/09/2000 00:11:50
 
 
À
01/09/2000 02:35:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00411610
Message ID:
00412056
Vues:
13
Thanks, Bjorn:

Your problem is that dadgummed relative path stored in the FRX to the table. A simple, permanent fix to this is to change ReportForm to accept TWO parameters, the Report Form name (as is now) and a new parameters which we'll call cPathToData

Now change these lines:
If !EMPTY(ALLT(f2w_ccurdbc[m.i])) AND FILE(ALLT(f2w_ccurdbc[m.i]))
   f2w_cusecommand=creportpath+ALLT(f2w_ccurdbc[m.i])+"!"+f2w_cusecommand
Else
   f2w_cusecommand=creportpath+f2w_cusecommand
Endif
to.....
cPathToData=ADDBS(cPathToData)
If !EMPTY(ALLT(f2w_ccurdbc[m.i])) AND FILE(ALLT(f2w_ccurdbc[m.i]))
   f2w_cusecommand=cPathToData+ALLT(f2w_ccurdbc[m.i])+"!"+f2w_cusecommand
Else
   f2w_cusecommand=cPathToData+f2w_cusecommand
Endif
Note replacing creportpath with cPathToData.




>I find FRX2word quite a usefull component.
>But i experienced the following problem:
>my report rpttest.frx is in the path v:\reports
>this report is based on a table tbltest which resides in v:\tables
>My program prgTest.prg resides in v:\modules
>
>When i execute prgtest (which is not more than the standard code you can find in frx2words helpfile), the program halts with the following message:
>
>"cannot find table v:\reports\tbltest.dbf"
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform