Page 1 of 1

Convert string to Int or double

Posted: Tue Jun 16, 2009 4:05 am
by atryass
Hi
I want to convert a string into Int in Text Editor but I don't know how?
In my report I want to div to value of Text component but I can't do this.
Plz help me.
tanx

Convert string to Int or double

Posted: Tue Jun 16, 2009 5:55 am
by Jan
Hello,

You can use following codeL

Code: Select all

int.Parse(value)
Thank you.

Convert string to Int or double

Posted: Wed Jun 17, 2009 2:19 am
by atryass
Tanx Jan
But I use the following code in Text17 in my report

Code: Select all

{Div(double.Parse(Text15.Text),double.Parse(Text18.Text))}
but when run my report this error occuerd:
Expression in Text property of 'Text17' can't be evaluated!
how can I solve this problem?
if is it true that convert this code to string?(how convert to string?)
PLZ help me!

Convert string to Int or double

Posted: Wed Jun 17, 2009 9:28 am
by Ivan
Hello,
atryass wrote:But I use the following code in Text17 in my report

Code: Select all

{Div(double.Parse(Text15.Text),double.Parse(Text18.Text))}
but when run my report this error occuerd: ...
Best way to solve this issue:
If Text15 contain expression {yourDataSource.Field1} and Text18 contain expression {yourDataSource.Field2},
then please write in Text17 following expression:

Code: Select all

{Div(yourDataSource.Field1, yourDataSource.Field2)}
Thank you.

Convert string to Int or double

Posted: Sat Jun 20, 2009 2:06 am
by atryass
Hi
tanx Ivan
but my Text17 is a sum of column in a group!and it is not a field from my data source.

Code: Select all

{Sum(GroupHeaderBand1,vTimeSheetPlan.ActualWork_Hour)}
How can solve this problem?

Convert string to Int or double

Posted: Mon Jun 22, 2009 1:33 am
by Ivan
Hello,
atryass wrote:but my Text17 is a sum of column in a group!and it is not a field from my data source.

Code: Select all

{Sum(GroupHeaderBand1,vTimeSheetPlan.ActualWork_Hour)}
How can solve this problem?
If Text15 contain expression {Sum(GroupHeaderBand1,vTimeSheetPlan.ActualWork_Hour)} and Text18 contain expression {yourDataSource.Field2},
then please write in Text17 following expression:

Code: Select all

{Div(Sum(GroupHeaderBand1,vTimeSheetPlan.ActualWork_Hour), yourDataSource.Field2)}
Thank you.

text having more than 10 dogits is not displaying

Posted: Tue Apr 20, 2021 12:01 pm
by ram
I have a text field, from json iam binding a number to that field, it is displaying if number has 10 digits but if number has more than 10 digits the text field is not displaying. iam using 2021.2.2 version.
In 2019 version it is working properly

Re: Convert string to Int or double

Posted: Tue Apr 20, 2021 9:49 pm
by Lech Kulikowski
Hello,

Please send us a sample report with test data that reproduces the issue for analysis on support@stimulsoft.com

Thank you.