Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal Report Viewer table locations
Message
De
10/10/2005 10:27:40
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
 
 
À
07/10/2005 14:25:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01056983
Message ID:
01057669
Vues:
12
This seems to work nicely. The location already includes the table name.

>Looks pretty close. I think you need to specify the table name as part of the location.
>
>>I think I've got it! Here's the code for anyone else who might need it (I'm using CR10, VFP8 and Fox2X tables):
>>
>>
>>loCR=CREATEOBJECT("CrystalRuntime.Application")
>>loRpt=loCR.OpenReport("MyReport.rpt")
>>
>>IF loRpt.HasSavedData
>>   loRpt.DiscardSavedData()
>>ENDIF
>>FOR EACH loTable IN loRpt.Database.Tables
>>   loTable.Location=FORCEPATH(loTable.Location,"c:\MyPath\")+".dbf"
>>ENDFOR
>>FOR EACH loSection IN loRpt.Sections
>>   FOR EACH loObject IN loSection.ReportObjects
>>      IF loObject.Kind=5 && Subreport
>>         loSub=loRpt.OpenSubreport(loObject.SubReportName)
>>         IF loSub.HasSavedData
>>            loSub.DiscardSavedData()
>>         ENDIF
>>         FOR EACH loTable IN loSub.Database.Tables
>>            loTable.Location=FORCEPATH(loTable.Location,"c:\MyPath\")+".dbf"
>>         ENDFOR
>>      ENDIF
>>   ENDFOR
>>ENDFOR
>>
Elyse Pomerantz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform