Page 1 of 1
mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Fri Mar 22, 2019 12:53 pm
by naveen84
Hello Guys ,
I'm generating a sample report using stimulsoft along with Java.
My report has <GetValueEvent> tags , which are not working with Java .
"e.Value" variable is not showing the value with Java .
EXMAPLE
<GetValueEvent>
if(Employees.FirstName.Length >5){
e.Value = Employees.FirstName+"KRSNA";
}
else{
e.Value = Employees.FirstName+Employees.LastName;
}
</GetValueEvent>
Could you please suggest me to overcome the issue ?
Thanks.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Fri Mar 22, 2019 3:54 pm
by Lech Kulikowski
Hello,
Unfortunately, the code in events is not supported in the Java version.
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Sat Mar 23, 2019 7:01 am
by naveen84
Hello Lech,
Glad to hear from you . In addition , I'm writing the conditional expressions in my mrt file .
Example :
{Employees.firstName.Contains("K") ? Employees.firstName : "madhu"}
It worked well with Stimulsoft , the condition is working as expected.
But in Java version , the conditional expression also didn't work as expected.
Does conditional expression have any limitations with Java version ? The methods like Contains() , Split() , Index() etc.. are not working with Java .
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Mon Mar 25, 2019 3:08 pm
by Lech Kulikowski
Hello,
Contains(), Split(), Index() - .NET methods, available in the NET based products.
In the Java version, you can use only functions from the Dictionary.
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Tue Mar 26, 2019 5:09 am
by naveen84
Hello Lech,
We will look into your solution .
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Tue Mar 26, 2019 6:19 am
by HighAley
Hello.
Please, let us know if you need any help.
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Fri Mar 29, 2019 5:29 am
by naveen84
Hello HighAley,
As we discussed earlier , you said events will not work with Java . Can you please have a look at the following code snippet . It has <GetValueEvent> which is not working with Java.
So do we have any other way to make it work ? Can we replace <GetValueEvent> with Conditional expressions ? If so, could you please send me that expression for the following code ?
Some of events have .NET methods which are not working with Java . I've checked the methods available in Dictionary(as you mentioned) . But those are not enough to fill my requirement.
<GetValueEvent>
if (NAME2.Length>0)
{
if (DESC.Length > 0)
{
e.Value = DESC;
}
else
{
if(XYZ.ToString()=="1")
e.Value="Not Done";
else if(XYZ.ToString()=="2")
e.Value="Pending";
else if(XYZ.ToString()=="3")
e.Value="Done";
else if(XYZ.ToString()=="4")
e.Value="Failed";
else
e.Value="Not Done";
}
}
else
e.Value="";
</GetValueEvent>
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Mon Apr 01, 2019 9:08 am
by naveen84
Hello Guys,
Could you please respond for my previous question ? It is quite emergency.
Thank you.
Re: mrt file <GetValueEvent> "e.Value" is not working with java.
Posted: Tue Apr 02, 2019 8:39 am
by Lech Kulikowski
Hello,
Please try to use the IIF() function in the expression instead of code in events.
Thank you.