Problem getting shapes to line up.
Hi,
I'm having a problem getting all my borders / shapes to align. ie - if I
have a shape (box) in the header, and I want to continue the lines down in a
detail band - I find sometimes that I am unable to get the vertical lines in
the detail band to light up with the line/box/border in the header band.
Sometimes the detail line will go slightly to either side of the header
line, or the line will be greater in width, thus not allowing the report to
print neatly.
Is their a trick to getting this right?
Thanks & Regards
Adam.
I'm having a problem getting all my borders / shapes to align. ie - if I
have a shape (box) in the header, and I want to continue the lines down in a
detail band - I find sometimes that I am unable to get the vertical lines in
the detail band to light up with the line/box/border in the header band.
Sometimes the detail line will go slightly to either side of the header
line, or the line will be greater in width, thus not allowing the report to
print neatly.
Is their a trick to getting this right?
Thanks & Regards
Adam.
This discussion has been closed.
Comments
1. Make sure the Left and Width properties of each of the shapes is
identical to ensure they are lined up.
2. If you are creating a grid or border that covers the entire report, you
may consider using the PageStyle. This prints behind the report the entire
length of the page so there would be no need to line anything up.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I have tried this.
I have used this method in some instances, but in others I require something
else.
The problem I am having is as follows:
For the Header, I may have a box (shape) that starts at one point, and ends
at another.
For the detail, I don't want to use a box (as the lines between the detail
items would then double in thickness as the bottom of the previous record
prints just above the top of the next record, making the line twice as
thick.
So, to combat this, I use a ppLine component instead. However, I find that
the tPPLine component doesn't always allow me to match either the left side
line of the box above, or the right side line of the box. (Even if the left
property is exactily the same).
I think that the problem is because I'm using two seperate components. A
box, and a line. I was wondering if their was any 'trick' to this?
I have also found that the border properties of the components do not line
up with other boxes or lines either (either with alignment, or width).
Thanks & Regards
Adam Hair.
After looking at the source a bit, it looks like ReportBuilder uses the
TCanvas.Rectangle() procedure to draw a rectangle shape and the
TCanvas.LineTo() procedure to draw a line (the border property also uses
LineTo). When drawing lines, RB starts at the edge of the component and
draws in toward the center as the line gets thicker. A shape however is
positioned in the middle of the boundary (a shape is only capable of being
one screen pixel wide so the error in most cases is negligible). I noticed
that the shape and line were consistently about two printer pixels off when
trying to line them up. Adjusting the line component by two printer pixels
seemed to fix the problem. I will look into fixing this for a later
release. In the mean time, I would either recommend using all line
components or adjusting them the two pixels as needed.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you very much for your reply! The problem I have at the moment, is
similar to as you described. I can either try and line them up for the
printer, or line them up for the screen (when exporting to PDF, etc). Either
way, they will either look incorrect for the printed form, or the on screen
form.
It certainly helps to understand where the problem comes from. I'm assuming
from what you've stated that I should be able to Line Borders up with Lines,
but not line up Lines with Shapes, or Shapes with Borders. I will try using
ppLabels with no caption, and borders to replace my rectangle shapes to see
if I can get these to line up with the lines. As I use rectangles heavilly
in the forms I print, and you could probably imagine it will be a pain to
line up for lines for a square instead of using just one component.
If you could have this 'fixed' in a later release, I would be exteremely
grateful. :-)
Thanks & Regards
Adasm.
Thanks for the info. From what I can gather, it looks like we will need to
start drawing rectangles with the LineTo routine as well to get them to line
up. I will see if I can get this fixed for a patch and get back to you
asap.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks mate - Can't thank you enough. That would probably be the best
Christmas present I'll receive this year. :-)
Cheers mate
Adam.
I was wondering if you had made any progress with this, or if it was going
to me more difficult than first met the eye?
Cheers
Adam.
Sorry about not keeping you updated. Due to the nature of the fix, this
will be addressed for the next release of ReportBuilder.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Scratch that last post . After thinking about it for a little while
longer I found that it was possible to create a temporary patch for this
issue. Please send an email to support@digital-metaphors.com requesting the
patch and I'll send it to you as soon as possible.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com