Home Component Writing
New Blog Posts: Merging Reports - Part 1 and Part 2

Feature Request: Enhancement for Rectangle Component

edited September 11 in Component Writing
Hi,

We have several custom reports where we need to consistently use rectangles and lines on the right, left, and other sides within the MainReport, subreports, etc.

Currently, we are using lines with `parentheight`, aligning them left for the left side and right for the right side. However, we are facing an issue where we cannot ensure that all lines are perfectly aligned. Even when we define the positions of the lines in the code, upon zooming into the PDF, some lines are off by 1px to the left or right, though not all of them, just a few.

To address this issue, I propose using a rectangle component instead of individual lines. However, for this to work, we need the ability to selectively control which sides of the rectangle are drawn. For example, we would need properties like:

component.drawtopline := false;
component.drawbottomline := false;

Or even better, a set property such as:

component.DrawLines := [dlLeft, dlRight];

Would it be possible for you to extend the default rectangle component with such functionality?

Thank you for your consideration!

Yusuf Zorlu
MicrotronX - Speditionssoftware vom Profi
https://www.microtronx.com

Comments

  • Hi Yusuf,

    The real issue is that the Windows API renders lines from the outside edge inward whereas PDF renders lines from the center point. ReportBuilder has logic to handle this however occasionally (usually due to rounding) they can be a single pixel off. For instance when a line is 5 pixels wide.

    If you are experiencing inconsistencies, please create a simple example of this and send it to me in .zip format and I'll see if there is something that can be done.

    Moving forward we will consider adding individual side selection to the rectangle component however I'm not completely sure that will solve the issue with PDF.
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • Hello Nico, in all cases where we use rectangle components, the lines are ok. So I think if we use always rectangle component - also for only showleft, showright enabled it should work. thanks for considering extension to your component.
    Yusuf Zorlu
    MicrotronX - Speditionssoftware vom Profi
    https://www.microtronx.com
Sign In or Register to comment.