Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reports using the form's DE: problems with SET SKIP
Message
De
03/08/1999 09:51:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Reports using the form's DE: problems with SET SKIP
Divers
Thread ID:
00249196
Message ID:
00249196
Vues:
63
This is the latest installment of my experiments in sharing the data environment of a form and a report, which takes advantage of any filters applied to the table. In my last query, I asked why a 1:M report only displayed the first child record. The answer involved using SET SKIP to force the report to see the child table as a 1:M relation. Here's part of the sample code I posted at that time:
*-- imNeg is the parent of imPrint, in a 1:M relationship

public vFPtr

*-- open form with reference pointer, move to form's DS
do form forms\imnegfrm name vFPtr linked
set datasession to vFPtr.datasessionid

* -- now let the report use the form's data environment
select imNeg    
set skip to imPrint    && allow multiple children in report
report form reports\imrel_r1 preview
set skip to            && preserve normal behavior in form
*-- control returns to form
This works correctly when the full report is printed. But if I try to print only one record, using:
report form reports\imrel_r1 next 1 preview
only the first child record is displayed. My guess is that the problem is caused by the fact that the record pointer hasn't moved since SKIP was reset. But my experiments to correct the problem haven't been successful. Does anyone have suggestions?

On the broader question of whether I should be doing this in the first place, I'm coming around to the answer "probably not". But rewriting the whole thing in terms of queries and cursors is going to take some time, and I still will want to share the form and report DE's when possible, to save the time of a separate report query.

Thanks for any enlightenment on these issues.

BEW
Barbara Weitbrecht
Archives Division
National Air & Space Museum
Smithsonian Institution

"Magic is real... unless defined as integer"
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform