Use of wildcards in if statements
Hello
I have created a report which gives me a list of vehicles along with there
corresponding fleet numbers. As the list of vehicles is made up of cars
and vans, there fleet numbers are prefixed with either 'C' or 'V'.
On the report i have created a variable which i want to display the total
number of vehicles that has a fleet number that starts with 'C'.
Is there a way for me to accomplish this, I have tried to use wildcards
but it does not return a value.
Regards
Jamie
--- posted by geoForum on http://delphi.newswhat.com
I have created a report which gives me a list of vehicles along with there
corresponding fleet numbers. As the list of vehicles is made up of cars
and vans, there fleet numbers are prefixed with either 'C' or 'V'.
On the report i have created a variable which i want to display the total
number of vehicles that has a fleet number that starts with 'C'.
Is there a way for me to accomplish this, I have tried to use wildcards
but it does not return a value.
Regards
Jamie
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
Inside the OnCalc event of the TppVariable, you will need to check the value
of the current record and increase the total value if it starts with a C.
Something like the following...
lsFieldValue := Report.DataPipeline['Vehicle'];
if Pos('C', lsFieldValue) = 1 then
Value := Value + 1;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com