Page 1 of 2

Conditional double lined border

Posted: Fri Dec 16, 2022 11:10 am
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;

Re: Conditional double lined border

Posted: Fri Dec 16, 2022 2:45 pm
by Max Shamanov
Hello,

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

Thank you.

Re: Conditional double lined border

Posted: Tue Dec 20, 2022 12:26 pm
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.

Re: Conditional double lined border

Posted: Tue Dec 20, 2022 12:43 pm
by Max Shamanov
Hello,

You are welcome!

Re: Conditional double lined border

Posted: Tue Dec 20, 2022 1:03 pm
by Plekuz
Sadly, it does not work as expected.

The condition:
condition.jpg
condition.jpg (5.95 KiB) Viewed 1652 times
The result:
result.jpg
result.jpg (5.01 KiB) Viewed 1652 times
Notice I made a style which should show a double line at the bottom, not a single one.

Re: Conditional double lined border

Posted: Tue Dec 20, 2022 1:08 pm
by Max Shamanov
Hello,

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

Thank you.

Re: Conditional double lined border

Posted: Tue Dec 20, 2022 3:15 pm
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.

Re: Conditional double lined border

Posted: Tue Dec 20, 2022 4:14 pm
by Max Shamanov
Hello,

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

Thank you.

Re: Conditional double lined border

Posted: Thu Dec 22, 2022 2:51 pm
by Plekuz
another.jpg
another.jpg (16.22 KiB) Viewed 1625 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)

Re: Conditional double lined border

Posted: Fri Dec 23, 2022 12:59 pm
by Max Shamanov
Hello,

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

Thank you.
#9615