Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub-report possible in VFP?
Message
 
À
06/09/2002 14:01:40
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00697277
Message ID:
00698315
Vues:
14
Okay .. here's an untested theory .. but it might work.

Create a local variable in the code just before printing (llFirstPass = .t.)

In the On Exit expression on the Group Footer ... call the following method:
FUNCTION ResetPointer
IF llFirstPass
  SEEK MyDataGroup && Reset the pointer to the top of this data group
  llFirstPass = .f.
ELSE
  llFirstPass = .t.
ENDIF
RETURN
I have no idea what this will do to the group header and group footer processing .. but it's the only concept I can think of besides adding each record to the cursor twice.

Good luck ... and I'm curious if this works so let me know.

Cathy



>Hi Tracy,
>
>Thanks for the help. In my situation, I have both types of detail data in the same record. In other words, if I have four detail records, I need to print four lines containing the first type of information, then I need to print four lines containing the second type of information from those same records. I don't think VFP can handle this situation (without some fancy record pointer manipulation), but if you know a way, please pass it along. I'm currently in the process of creating separate records for each type of data.
>
>Thanks again.
>
>>I do this more often than I care to think about. What I do is something that Cathy Pountney recommended. I add fields to the cursor for a print when condition. Let's say I call the field cprint and make it c(1). If I need two different detail bands I set the field value to the records that go in the first detail band to '1' and the records that get printed in the second detail band I set the value in the cprint field to '2' This means of course that I have to step through the cursor before I run the report so I can set the appropriate values. Then when designing the report, I set the print when value of the report object to cprint=.t. and set it to remove line if blank. If I want absolutely NO white space I will set all of the values of the detail objects on the report and then lay them on top of each other. But when I have different headings that must go above each group that need to print whether there is detail or not, I either do the same with column headings (use the
>print
>>when clause) or I will put the headings with the print when settings in the detail band also and I create a header record (for the column headings) in the table that comes just before the detail records for that group which then prints just before the detail lines for that group because the record is before it and it doesn't print again because of the print when clause (it can just be set to check for empty() in that case so the record doesn't print if there is no header information in the header fields.
>>
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform