Help to use Variables
Hello, I try to use Variables, in Groups, but I get some erros...
I have 2 Variables...
Variable1, is the sum of Valor (These variable is work)
if my Field tipo_despesa is DEBITO I make these calc:
Variable2.Value := Variable2.Value - Variable1.Value;
if my Field tipo_despesa is CREDITO I make these calc:
Variable2.Value := Variable2.Value + Variable1.Value;
I try to do this on OnCalc in my Variable1, these code:
Value := Value + DBPipeline1['valor'];
if DBPipeline1['tipo_despesa'] = 'Cr?dito' then
Variable2.Value := Variable2.Value + Value;
if DBPipeline1['tipo_despesa'] = 'D?bito' then
Variable2.Value := Variable2.Value + (Value * -1);
But these Error Appears: Could not Run program: Variable1OnCalc
My code is incorrect ?
P.S: Variable1 is in Detail, and Variable2 is in Footer of Group[1]
Thanks for All
Fellipe H.
I have 2 Variables...
Variable1, is the sum of Valor (These variable is work)
if my Field tipo_despesa is DEBITO I make these calc:
Variable2.Value := Variable2.Value - Variable1.Value;
if my Field tipo_despesa is CREDITO I make these calc:
Variable2.Value := Variable2.Value + Variable1.Value;
I try to do this on OnCalc in my Variable1, these code:
Value := Value + DBPipeline1['valor'];
if DBPipeline1['tipo_despesa'] = 'Cr?dito' then
Variable2.Value := Variable2.Value + Value;
if DBPipeline1['tipo_despesa'] = 'D?bito' then
Variable2.Value := Variable2.Value + (Value * -1);
But these Error Appears: Could not Run program: Variable1OnCalc
My code is incorrect ?
P.S: Variable1 is in Detail, and Variable2 is in Footer of Group[1]
Thanks for All
Fellipe H.
This discussion has been closed.
Comments
Based upon your description I am going to make a couple of assumptions
1. You are using the Calc workspace of the Report Designer (i.e. RAP). (If
so, its better to post this question in the RAP newsgroups so we know
automatically the context of the question).
2. The code compiles but when you preview/print the error occurs.
Most likely cause is the TppVariable DataType is not set to the correct
type. Access the Design the workspace. Select the TppVariable and use the
drop downlist on the ?Edit toolbarto modify the datatype. Or use the object
inspector.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com