Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Carry forward a group total
Message
 
 
To
28/08/2008 18:41:57
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01342833
Message ID:
01342893
Views:
15
>>>Can't seem to get this one to work. I created 2 variables julTotal and julPrior for July. julTotal sums jul and prints OK in the group footer. julPrior is initialized at 0 and is not reset. Tried _vfp.SetVar('julPrior',julTotal) in all the onentry and onexit values but all I ever get for its value is 0 or the total for the current detail band.
>>
>>Let's try to create julPrior not as a variable in the report, but as a local (or private) variable in the calling program. Or you may try to create this variable as public in report's DE Init method and release it in its Destroy. I think it should work this way instead of using report variable.
>>
>>Also note, that I'm trying this theoretically, without VFP close by.
>
>julPrior will be needed for each year of the report (different values) so having it as a "loose" variable probably isn't feasible. It could be a field in the cursor if we can figure out how to create it. So far my attempts haven't worked. Remember the records have a fisyear column. So julPrior for the 2008 records will be equal to julTotal for the 2007 records and so forth.

May be we can add 12 extra fields to your cursor and calculate them separately in scan loop?

We can do this by one Update Command and even by one select command, but it's tricky. It's probably simpler to use a scan loop.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform