reset value with Group based on Custom Var
I have a group based on a custom field with totals and I cannot seem to
reset these fields. I have set the ResetComponent to the custom field. Is
this correct?
I have tried changing the resettype to veGroupEnd, veGroupBeforeHeader and
ve GroupStart - none of these seem to reset the groups vars. Is it
necessary to code the onreset event - I have tried this also.
Thank you,
Matthew Tilles
reset these fields. I have set the ResetComponent to the custom field. Is
this correct?
I have tried changing the resettype to veGroupEnd, veGroupBeforeHeader and
ve GroupStart - none of these seem to reset the groups vars. Is it
necessary to code the onreset event - I have tried this also.
Thank you,
Matthew Tilles
This discussion has been closed.
Comments
1. Due to a timing issue, if you want to group on a TppVariable or TppLabel,
you need to use the OnGetText event rather than the OnCalc:
procedure TForm2.ppVariable1GetText(Sender: TObject; var Text: String);
begin
Text := 'some value'
end;
An alternative to the above approach is to use to the Group.OnGetBreakValue
event.
2. Press the right mouse over the TppVaraible and select the Timing.. menu
option to access the Timing dialog. You probably want to select GroupEnd -
that is most common. Then select the Group as the Reset Component. By using
the Timing dialog, only Group objects will be displayed in the drop down
list.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks - I used the timing dialog and this works great however, I have
another related timing issue:
I have a variable in the footer which is a sum of a calculated field in the
detail section. This correctly sums the value. There is a second var which
is the first var rounded - this also calculates correctly.
I have a third var which is the rounded value multiplied by a sales tax rate
(6.75%) This value consistently leaves off the last record in the detail
section so that if the last record is 100 the total & rounded total
calculates correctly but the sales tax will be off by 6.75. There appears
to be a timing problem here. Can you point me in the right direction?
I hope this is clear.
Thanks again,
Matthew
recommended way - is there a global calcorder dialog for the form or band?
Matt
the
which
rate
calculations which depend on another. The calc order is specific to each
band. There is no calc order which can be applied across bands. If you have
variables in different bands, try moving them to a common bands such that
the calc order can be used. Then simply use labels in the desired bands
where the calculations should be displayed. BTW- You can set a variable to
be invisible and it will still fire its OnCalc event to perform the
calculation.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com