General information
Category:
Third party products
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only