Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report not found
Message
 
 
To
17/07/2004 09:55:48
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00925471
Message ID:
00925489
Views:
15
This message has been marked as the solution to the initial question of the thread.
--
I can do the latter if necessary, but I wondered if there is a way to tell main.app to look for the report in custom.app.
---

No, there really isn't. Unless there is a way to USE a table directly from inside another module, which I don't think there is.

You should, however, be able to write something like the following in a callable procedure or object method in your custom app.

I will do this very quickly but I want to include some of the params I think would be necessary to do this robustly. That means the code will be untested but you'll get a set of requirements from it <s>:
PROCEDURE GetCustomReportFromApp(;
   tSourceFRX,  tResultPath, tResultFRX)

   LOCAL lcResultFRX, lcSourceFRX

   * you need an ASSERT or early quit
   * if method is called incorrectly:

   lcSourceFRX = ;
     FORCEXT(FULLPATH(TRANS(tSourceFRX)),"FRX")

   IF NOT FILE(lcSourceFRX)
      * FILE() should find it in the custom app
      * because we're in the custom app
      RETURN .F.
   ENDIF

   * source file must be found

   IF EMPTY(tResultFRX)
      lcResultFRX = JUSTFNAME(lcSourceFRX)
   ELSE
      lcResultFRX = tResultFRX
   ENDIF

   IF EMPTY(tResultPath)
      lcResultFRX = FULLPATH(lcResultFRX)
   ELSE
      lcResultFRX = FORCEPATH(lcResultFRX, ;
                     tResultPath)
   ENDIF

   lcResultFRX = FORCEEXT(lcResultFRX,"FRX")

   IF EMPTY(SYS(2000,lcResultFRX))

      USE (lcSourceFRX) && as a table
      COPY TO (lcResultFRX)

      && or SELECT INTO a TABLE if you prefer
      
   ENDIF

   RETURN ( NOT EMPTY(SYS(2000,lcResultFRX)) )
After a RETURN .T. from this method call or proc, you should be able to go ahead with your generic.app processing.


>L<
Previous
Reply
Map
View

Click here to load this message in the networking platform