expressions

Stimulsoft Reports.WEB discussion
Post Reply
rierup
Posts: 4
Joined: Thu Mar 12, 2020 4:13 pm

expressions

Post by rierup »

Hello,
in a report in the databand i have 2 panels each docked on top.

In the first panel i do some calculation:
In a text-component i put in the expression { var = var + 1 }

In the second panel i try to print the result:
In a text-component i put in the expression { var.ToString() }

Is it possible to put the first panel unvisible but doing the expression?
When i set Enabled = false or Print=false to Panel1 then it does no calculation.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: expressions

Post by Lech Kulikowski »

Hello,

You can link the Text component to the Panel and then set the Panel size to 0.

Thank you.
rierup
Posts: 4
Joined: Thu Mar 12, 2020 4:13 pm

Re: expressions

Post by rierup »

Many thanks for your fast answer.

But:
I tried your suggestion to set Panel size to 0.
1. Problem is for modifications i cannot set the size back to 0.4
2. On the preview after size to 0, now i see Panel1 and Panel2 on top of each other

For clarification:
In the databand are the following components:
Panel1 (size 0.4, docked to top) with Text-component with expression { var = var + 1 }
Panel2 (size 0.4, docked to top and has 2. place under Panel1) with Text-component with expression { var.ToString() }

Only Panel2 should be visible, Panel1 should only do the calculation and not be visible.
Result for each sentence in the databand should be:
1
2
3
...

Do you think this is possible. I do this all only in the mrt-file, no programming in c#
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: expressions

Post by Lech Kulikowski »

Hello,

Please check the sample report.

Thank you.
Attachments
Report.mrt
(5.7 KiB) Downloaded 63 times
rierup
Posts: 4
Joined: Thu Mar 12, 2020 4:13 pm

Re: expressions

Post by rierup »

Thank you very much
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: expressions

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply