Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Report Viewer table locations
Message
From
10/10/2005 10:27:40
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
 
To
07/10/2005 14:25:32
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01056983
Message ID:
01057669
Views:
11
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform