Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Frx2word possibilities
Message
From
26/03/2002 04:25:15
Adam Weisberg
Adam Weisberg Consulting
Athens, Ohio, United States
 
 
To
25/03/2002 20:15:55
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00637047
Message ID:
00637132
Views:
18
John,

It's really a generous & brilliant thing you & Fabio have done.

I understand your desire to render a native report as precisely as possible & I think it makes a lot of sense. However by aptly restructuring the code, it would be easy to retain the functionality that it has -- of rendering a report just as it would be in in VFP -- while adding the subreport capability.

The important thing is to split the code into 3 methods:

1. OpenDoc() would create & setup the Word document & performance enhancing defaults.

2. InsertReport() opens the frx, sets up a new private datasession if required by the frx, and inserts a report into the doc. The trick is, InsertReport calls itself recursively (1 level only I suppose) when it comes across, say, a caption "%frx2Word% SUBREPORT=whatever.FRX DETAIL=invoices". InsertReport also closes the datasession it opened and returns to the datasession, alias & record it left off at so as to be a well-behaved recursive thingie.

3. CloseDoc() would close the document and restore defaults.

All these methods called by ReportForm of course, which itself gets to be rather empty.

...This restructuring wouldn't affect the formatting at all for a report that doesn't put in a magic caption. But when I tried to restructure the code this way I realized how much work you two did to figure out all the calls to Word, not to mention interpreting the frx! And I realized how long, how very long, it would take me to catch up...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform