String functions

Stimulsoft Reports.PHP discussion
Post Reply
tony.tomov
Posts: 72
Joined: Mon Jun 07, 2010 2:39 am

String functions

Post by tony.tomov »

Hello,
Just want to ask?

Does the string functions work?

I'm trying to implement simple conversion in expression like this

{ Data.CustomerID == ToupperCase(Variable1) }

but it does not seems to work.

PLEASE ADD THE VERY BASIC FUNCTION POS (or similar) which find the position of substring in string
The JavaScript equivalent is indexOf.

Kind Regards
Tony

Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

String functions

Post by Vladimir »

Hello,

In the functions list was error, we fix it. The correct format of this function is as follows:

{Data.CustomerID == ToUpperCase(Variable1)}

PLEASE ADD THE VERY BASIC FUNCTION POS (or similar) which find the position of substring in string
This function is available, you can use the following format:

{Data.CustomerID.IndexOf("John")}


Thank you.
tony.tomov
Posts: 72
Joined: Mon Jun 07, 2010 2:39 am

String functions

Post by tony.tomov »

Thank you Vladimir,

Both suggestions work perfectly.

Thanks again.
Some other things:

1. Could you please let us know which functions are available, but not listed in the Function list.
Just as recommendation - please add all available function or at least document all.

2. The problem with the Variable and expression is solved.
The same effect can be achieved if I set

Field is: Value,
DataType is : Expression
Data Field: CustomerID
Comaparation Opeartor
Expression: Variable1.

in Filter dialog

This work for me the same way.
The problem is comparator operator - When the Data Type is expression only ==, != >..
There is missing Begin with, end with, Contain operators.
IMHO the expression can be a string - so it is a good idea to add these in case of Expression.
That was the reason to use IndexOf to simulate begin with and etc)

3. It will be great if in the future we can attach a datepicker to some Variable field (you have already one), select box and other controls.
Also some kind of checking like numbers,integer, min, max and etc conditions will make your product one of the best in the market.

Thank you again
Best Regards
Tony
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

String functions

Post by Vladimir »

Hello,

1. Documentation at this moment is appended, a new version of the documentation comes only with the official release. The next release is scheduled on March.

2. At this moment available the following methods:
ToString()
ToLower()
ToUpper()
IndexOf(string)
StartsWith(string)
EndsWith(string)

3. These tasks are in our to-do list. We will add new elements of control.

Thank you.
Post Reply