Information générale
Catégorie:
Produits tierce partie
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...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement