event in java code

Stimulsoft Reports.JAVA discussion
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

event in java code

Post by simon ren »

in my application,i user reportjs in my web and use report-java in my server.

first i use code in event like "beforePrint","afterPrint","beginRender","Rending","endRender" in reportjs
second i need render my report in server by java.

but i found when i render in server by report-java the event when i use in reportjs doesn`t work

how can i use event code in reportjs and render it in report-java?
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: event in java code

Post by Lech Kulikowski »

Hello,

In the JS product, events very limited.
Could you explain your issue in more detail which code are you use in events?

Thank you.
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

Re: event in java code

Post by simon ren »

Lech Kulikowski wrote: Fri Apr 17, 2020 9:10 pm Hello,

In the JS product, events very limited.
Could you explain your issue in more detail which code are you use in events?

Thank you.
1.I use code below in js product
The attachment reportjs.png is no longer available
2.in my server i load the js product`s mrt file and render
server.png
server.png (49.07 KiB) Viewed 6662 times
but the code in the event doesn`t work,it doesn`t add a new page when line is 5
结果.png
结果.png (70.55 KiB) Viewed 6662 times
Attachments
reportjs.png
reportjs.png (92.71 KiB) Viewed 6662 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: event in java code

Post by Lech Kulikowski »

Hello,

Please check the following code:

Code: Select all

if (DataBandName.line == 5)
this.engine.newPage();
Thank you.
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

Re: event in java code

Post by simon ren »

Lech Kulikowski wrote: Mon Apr 20, 2020 9:14 am Hello,

Please check the following code:

Code: Select all

if (DataBandName.line == 5)
this.engine.newPage();
Thank you.
thanks, i try it but it doesn`t work.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: event in java code

Post by Lech Kulikowski »

Hello,

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

Thank you.
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

Re: event in java code

Post by simon ren »

Lech Kulikowski wrote: Thu Apr 23, 2020 9:20 am Hello,

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

Thank you.
here is the report.mrt and test data,thank you
format.mrt
(11.54 KiB) Downloaded 282 times
data.json
(1004 Bytes) Downloaded 273 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: event in java code

Post by Lech Kulikowski »

Hello,

You should use the following code in the BeforePrint event of the databand, not for the page:
if (DataCommonCmp2020.line == 5)
this.engine.newPage();

Thank you.
simon ren
Posts: 67
Joined: Wed Nov 21, 2018 12:51 am

Re: event in java code

Post by simon ren »

Lech Kulikowski wrote: Mon Apr 27, 2020 10:40 am Hello,

You should use the following code in the BeforePrint event of the databand, not for the page:
if (DataCommonCmp2020.line == 5)
this.engine.newPage();

Thank you.
thank you,i try it,use your code in the BeforePrint event of the databand,but it does`t work when i render it in java

the following pics is the event and rended pdf
event.png
event.png (111.37 KiB) Viewed 6347 times
result.png
result.png (77.51 KiB) Viewed 6347 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: event in java code

Post by Lech Kulikowski »

Hello,

Sorry for the misunderstanding. Events are not supported in the Java version.

Thank you.
Post Reply