Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Variables
Message
 
To
21/09/2004 17:38:34
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00944761
Message ID:
00944966
Views:
22
You are correct, report variables are processed just before it prints the items in the detail band. If you want to skip processing these variables when you are processing the records that belong to the summary band, you can use IIF() in the expression to not do anything to them. For example, if you have a variable that SUMs, you can do this:
IIF(MyTable.SummaryRecord, 0, MyTable.TheRealValue)
This will just add 0 to the total if you are on the summary record.


Cathy



>I can't seem to locate where the manual states when the Report Variables (as listed in Report Designer) are assigned while .FRX files are processed. Through experimentation I've determined that report variables are assigned just before processing the detail band (i.e. they're not assigned when the header band is being processed). Yes, I've answered my own question on when this occurs, I'm still wondering if the manual states anywhere regarding the order of events while processing report files.
>
>Though I've used VFP for some time, I hadn't come up with a situation until recently where this became a concern -- until now. Mainly this occurred while making a report that required a summary band that had a variable number of rows. This led to having to "fake" the summary band processing as a detail item, and conditionally print items. General format of report was something along the lines of:
>
>detail band:
>date time event-desc
>date time event-desc
>...
>date time event-desc
>
>summary band lists number of occurances of each event-type:
>event-type-1 #-occurrances
>event-type-2 #-occurrances
>...
>event-type-n #-occurrances
>
>The number of event-types is variable, so I can't pre-allocate the space and use conditional printing to "shrink" the band (the number of event types could concievably span multiple pages).
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform