Page 1 of 1

Having Trouble checking is a variable it greater then something.

Posted: Thu Feb 01, 2024 1:08 am
by David334
I am trying to check if a variable is greater than a number. It seems to be treating them as strings.

I have a variable "day" defined as a long type with an expression: DayOfYear(StrToDateTime(date_as_string)) <----- This is "supposed" to output as a long value.
Lets say for example the above returns 31 as a result.

I am trying to check if this "long" variable is greater than a number : {day>30?"greater","less"} this doesnt print anything.
So I tried just adding to it: {day+5}, but this outputs 315 and not 36 like I would expect.

Can someone help me with what I am doing wrong?

Thanks.

Re: Having Trouble checking is a variable it greater then something.

Posted: Thu Feb 01, 2024 11:41 pm
by Lech Kulikowski
Hello,

Please send us a sample report that reproduces the issue for analysis.

Thank you.

Re: Having Trouble checking is a variable it greater then something.

Posted: Fri Feb 02, 2024 1:18 am
by David334
Im not sure what format these reports are in. Its bundled with our shop software Jobboss2.
When I export it, I get a file extension of .cff. When I try to attach it, its says invalid.

Re: Having Trouble checking is a variable it greater then something.

Posted: Fri Feb 02, 2024 9:37 pm
by Lech Kulikowski
Hello,

> Its bundled with our shop software Jobboss2.

In that case, you should send your request to Jobboss2 developers, we do not know how they used our components in this application.

Thank you.

Re: Having Trouble checking is a variable it greater then something.

Posted: Sat Feb 03, 2024 5:48 pm
by David334
I'm only posting this for someone else who might run into this.
The solution was to use "Convert. " to convert to a usable number. I ended up converting to Double using Convert.ToDouble( ) and it worked as expected.

This is a programming issue and a lack of knowledge problem on my part, that I resolved no thanks to Lech.

Re: Having Trouble checking is a variable it greater then something.

Posted: Mon Feb 05, 2024 8:02 am
by Max Shamanov
Hello,

You are Welcome!