Value Type of TppVariable
Hi,
I don't know if this is normal, I usually use TppVariable for totals,
so "numbers", but now I need a string to tag along, and I get a
"Invalid Variant Type" message.
Here is the situation:
Variable
refValue : TppVariable;
refName : TppVariable;
On the design tab I have a variable "Check" of type "double" that I
use to calculate the values with a "if..then..else".
Check.OnCalc -->
if (number > 0) then
begin
refValue.value := number;
refName.value := 'Pos';
end;
Value := 0.0;
It doens't work, as long as I let refName.value there I get the
message invalid variant type.
I must make another variable of type String with the same code in it
just to initialise the name...
Is this normal?
When I define the variable to be a string instead of a double it
calculates everything without error message but then I get the known
problem of wrong totals.
Is there may be a way to set de data type of a TppVariable somewhere
zodat I can initialise it where I want?
Thankx
Chantal
I don't know if this is normal, I usually use TppVariable for totals,
so "numbers", but now I need a string to tag along, and I get a
"Invalid Variant Type" message.
Here is the situation:
Variable
refValue : TppVariable;
refName : TppVariable;
On the design tab I have a variable "Check" of type "double" that I
use to calculate the values with a "if..then..else".
Check.OnCalc -->
if (number > 0) then
begin
refValue.value := number;
refName.value := 'Pos';
end;
Value := 0.0;
It doens't work, as long as I let refName.value there I get the
message invalid variant type.
I must make another variable of type String with the same code in it
just to initialise the name...
Is this normal?
When I define the variable to be a string instead of a double it
calculates everything without error message but then I get the known
problem of wrong totals.
Is there may be a way to set de data type of a TppVariable somewhere
zodat I can initialise it where I want?
Thankx
Chantal
This discussion has been closed.
Comments
Would it be possible to keep a TppLabel updated with the proper text each
time the variable calcs so you don't have to deal with the string variable?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
This would be nice, but I don't think I can use a label...the name is
shown on the main report tab but it's being set in a subreport
variable... The only way I know how to pass information from a
subreport to a main report is through variables...
On Thu, 28 Feb 2008 08:56:40 -0700, "Nico Cizik \(Digital Metaphors\)"
How do you determine the text that is to be passed to the subreport
variable? Would it be possible to assign the variable a "numerical"
representation of the text value and perhaps use that to display the correct
text?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com