Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add e remove report's
Message
 
 
To
24/09/2001 11:30:35
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00560022
Message ID:
00560043
Views:
22
>How do you remove and add report to the project file Programmability ?
>
>thank you all

You have to use a Project object to do that. See sample code below (not tested)
* To add a file (report) to the current project

Application.ActiveProject.Files.Add('Myreport.frx')

* To remove a file (report) from the current project

FOR nCount = 1 TO nFileCount
   IF Juststem(Upper(Application.ActiveProject.Files.Item(nCount).Name))= "MYREPORT"
        Application.ActiveProject.Files.Item(nCount).Remove()
   ENDIF
ENDFOR

* Or

FOR Each oFile in Application.ActiveProject.Files
   IF Juststem(Upper(oFile.Name))= "MYREPORT"
        oFile.Remove()
   ENDIF
ENDFOR
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform