Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is UDF in detail band called multiple times?
Message
From
27/09/2001 18:15:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00561609
Message ID:
00561726
Views:
22
>>VFP internally calls it for who knows which reason, just to make sure everything prints right. I observed that behavior ten years ago, and the solution was to keep a report variable which will store the recno(), and the function would check if this has changed, in which case it stores the current recno() to the variable and does what it was written for, else it just exits. This variable should be zero initially.
>>
>>Maybe a better solution would be to have this function as OnEntry of the detail band; haven't played with it but it may be called only once per band.
>
>Dragan,
>
>Thanks for your reply. I have been playing with using the recno() in my function, but this does not help if I also want the greenbar effect in group subtotals. I am trying to give the user the ability to select how many lines (1-5) of greenbar they would like. I am having mixed results when the report goes from detail to several different group totals.

Not knowing what's a greenbar (I imagine it as a salad bar :) I can only suggest a separate function and a separate variable for each band, or the same function with different parameters, so it would check for the recno() in the detail, and the group expression in group bands.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform