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

Click here to load this message in the networking platform