Loop and iteration by zone

Stimulsoft Reports.NET discussion
Post Reply
tldang
Posts: 4
Joined: Fri Sep 23, 2022 12:39 pm

Loop and iteration by zone

Post by tldang »

Hello,

Does anyone know how to define a zone/section (which can be any type) that iterate/loop all elements in this zone/section?

If elements are cut/shown partly, the zone iteration should detect the border and iterate/loop only the part which is shown in zone/section.

Here is an image of what I want to achieve.

For more information, I tried bands but it's not exactly what I want.

Thank you.

Cheers
Attachments
expected-result
expected-result
output.png (6.24 KiB) Viewed 760 times
input-where-zone-iterated-2-times
input-where-zone-iterated-2-times
input.png (9 KiB) Viewed 760 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Loop and iteration by zone

Post by Lech Kulikowski »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.
tldang
Posts: 4
Joined: Fri Sep 23, 2022 12:39 pm

Re: Loop and iteration by zone

Post by tldang »

hello,

Ye, sure.

I was asked to implement a function where user can define a zone of iteration in the report template.

This zone should be repeated as counted by the counter that user defines.

Here, I can use DataBand (or some kind of Band with the property CountData).

That's ok until the demand is further than what DataBand can handle.

Roughly, user should be able to define any shape that intercepts the Band and the Band should only iterate the zone that is inside the Band.

As you see in the previous images, the iteration zone is defined by red border. it cuts 2 square "initial overlap" and "final overlap".

The counter is 2 (iterate 2 times).

So the iteration take only what are inside the defined zone and the result should be as describe in this attached image.

Can you help me with that?

Thank you so much.
Attachments
output.png
output.png (15.79 KiB) Viewed 739 times
tldang
Posts: 4
Joined: Fri Sep 23, 2022 12:39 pm

Re: Loop and iteration by zone

Post by tldang »

hello,

I found also a strange behavior when I try to preview the rendered report with this MRT.

Can you give it a look please?

Thank you a lot.
Attachments
Simple-Iteration.mrt
(11.07 KiB) Downloaded 81 times
Report_output.pdf
(37.41 KiB) Downloaded 84 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Loop and iteration by zone

Post by Lech Kulikowski »

Hello,

There are no standard ways to implement it. You can try to implement that task in scripts of report or in code. We can not provide any specific solution without detailed information.

> I found also a strange behavior when I try to preview the rendered report with this MRT.

You should use Rectangle (Flowchart) instead of the Rectangle (Basic), or Text with borders.

Thank you.
tldang
Posts: 4
Joined: Fri Sep 23, 2022 12:39 pm

Re: Loop and iteration by zone

Post by tldang »

hello Lech,

Do you have any example of how to use the script in the report please?

Thanks.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Loop and iteration by zone

Post by Lech Kulikowski »

Hello,

Unfortunately, we do not have such samples.

You can add necessary components in the report then open the Code tab and check the code.

Thank you.
Post Reply