mrt file <GetValueEvent> "e.Value" is not working with java.

Stimulsoft Reports.JAVA discussion
Post Reply
naveen84
Posts: 5
Joined: Fri Mar 22, 2019 12:26 pm

mrt file <GetValueEvent> "e.Value" is not working with java.

Post 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 &gt;5){
e.Value = Employees.FirstName+"KRSNA";
}
else{
e.Value = Employees.FirstName+Employees.LastName;
}
</GetValueEvent>

Could you please suggest me to overcome the issue ?

Thanks.
Attachments
files.zip
(486.25 KiB) Downloaded 220 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post by Lech Kulikowski »

Hello,

Unfortunately, the code in events is not supported in the Java version.

Thank you.
naveen84
Posts: 5
Joined: Fri Mar 22, 2019 12:26 pm

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post 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.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post 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.
naveen84
Posts: 5
Joined: Fri Mar 22, 2019 12:26 pm

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post by naveen84 »

Hello Lech,

We will look into your solution .

Thank you.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post by HighAley »

Hello.

Please, let us know if you need any help.

Thank you.
naveen84
Posts: 5
Joined: Fri Mar 22, 2019 12:26 pm

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post 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&gt;0)
{
if (DESC.Length &gt; 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.
naveen84
Posts: 5
Joined: Fri Mar 22, 2019 12:26 pm

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post by naveen84 »

Hello Guys,

Could you please respond for my previous question ? It is quite emergency.

Thank you.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: mrt file <GetValueEvent> "e.Value" is not working with java.

Post by Lech Kulikowski »

Hello,

Please try to use the IIF() function in the expression instead of code in events.

Thank you.
Post Reply