Conditional double lined border

Stimulsoft Reports.NET discussion
Plekuz
Posts: 7
Joined: Fri Dec 16, 2022 11:02 am

Conditional double lined border

Post by Plekuz »

I am trying to set a condition on a great number of fields to show a double lined border at the bottom. However: I do not see an option to set the border style when using conditions, only where the border should go. Is it possible to set which type of border it should display under certain conditions (i.e. double, single, dashed etc.)?

If I export to .cs I can do it in code, but that change would be overwritten everytime I have to go to the designer, edit the .mrt and convert it to .cs. So, not an option.

((Stimulsoft.Report.Components.IStiBorder) (sender)).Border.Style = StiPenStyle.Double;
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Conditional double lined border

Post by Max Shamanov »

Hello,

You can change the border style with the styles in the conditions.
Please check the attached image.

Thank you.
Attachments
Designer_tRJV7L5cDP.png
Designer_tRJV7L5cDP.png (49.78 KiB) Viewed 947 times
Plekuz
Posts: 7
Joined: Fri Dec 16, 2022 11:02 am

Re: Conditional double lined border

Post by Plekuz »

Thank you! Somehow I did not figure out you could define styles and use them there. Thought they were only meant for font and background coloring. Your answer helped me a lot.
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Conditional double lined border

Post by Max Shamanov »

Hello,

You are welcome!
Plekuz
Posts: 7
Joined: Fri Dec 16, 2022 11:02 am

Re: Conditional double lined border

Post by Plekuz »

Sadly, it does not work as expected.

The condition:
condition.jpg
condition.jpg (5.95 KiB) Viewed 919 times
The result:
result.jpg
result.jpg (5.01 KiB) Viewed 919 times
Notice I made a style which should show a double line at the bottom, not a single one.
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Conditional double lined border

Post by Max Shamanov »

Hello,

Please send us a sample report with test data that reproduce the issue.

Thank you.
Plekuz
Posts: 7
Joined: Fri Dec 16, 2022 11:02 am

Re: Conditional double lined border

Post by Plekuz »

As an attachment a VS2019 console project with an extremely simple report showing two fields. The field with value 1 has a conditional style which should show up as a single border top and a double lined border bottom. However, when rendered and saved to PDF there is no double lined border at the bottom of the field with value 1. It shows a single line.

The solution writes the PDF file to the root of C:\. You may want to change the location for your purpose. Included in the same folder as the solution is the PDF how it is rendered from the solution on my side.

Hopefully you have enough information to reproduce the problem.
Attachments
StimulsoftExample.zip
(116.45 KiB) Downloaded 73 times
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Conditional double lined border

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Plekuz
Posts: 7
Joined: Fri Dec 16, 2022 11:02 am

Re: Conditional double lined border

Post by Plekuz »

another.jpg
another.jpg (16.22 KiB) Viewed 892 times
Additional problem: besides it not rendering a double line, the bottom line is also rendered thinner when there is a gray background (we have one column with a gray background in the report)
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Conditional double lined border

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#9615
Post Reply