Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
[Print When] for Group Bands?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00942044
Message ID:
00942142
Vues:
17
You can make the group expressions dynamic by using EVALUATE(). Maybe this will help you do what you want. For example, set the data group expression of the first group to: EVALUATE(cExpression1). Then set the data group expression of the second group to: EVALUATE(cExpression2) ... and so on.

In code, do this:
IF {some condition}
  cExpression1 = 'customer.state'
  cExpression2 = 'customer.custid'
ELSE
  cExpression1 = 'customer.state'
  cExpression2 = '""'
ENDIF
REPORT FORM MyReport ...

The above code would make the report break on State -- then Customer ID for the first condition. Otherwise, it only breaks on State, never anything else because the second expression always evaluates to the same thing for every record in the report.

I hope this helps,
Cathy





>VFP5
>
>I've got a report, where the user may choose to group the detail records by up to N levels, or not group them at all. In the past, I've handled this by creating (N + 1) reports and then selecting the right report at run time e.g. Report0 (with no Group bands) if no grouping selected, Report3 (with 3 Group bands) if 3 grouping levels selected, etc.
>
>What I'd like to do is create just a single report with the maximum number of grouping levels (i.e. "ReportN"), and suppress any group bands that may not be necessary for a given report run. Can anyone think of a way to do this? I'd rather not hack the .FRX unless it's fairly straightforward; for me it would probably take no more effort than building N reports.
>
>We have a "Print When" option that lets us optionally print fields in a detail band. Is there any way to implement something similar for Group bands?
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