`
Reports, Printing, Printers: Vertical lines in reports with resizing details 2005-01-11 -- Bob Campbell Newsgroups: comp.lang.clarion It's pretty easy if you figure out how it works. You have the height of the detail line as well as the the height of the band to work with. (On most reports, the vertical line of your box is not the same as the height of the band.) First, calculate the linelength as the number of lines in the description, minus 1, times the description height. The lineheight is then the height of the detail band plus the linelength. (The reason for the minus 1, is because the line is part of the band to begin with, so you don't want to count it twice). Finally I use the SETPOSITION to reset the line position in the print engine, so it doesn't mess up its pagination. I've attached an example PDF report that shows the lines on the band adjusting their height according to the height of a text field. I've used this code since CW1.0, so it seems pretty solid. Here is my embed code, to adjust the vertical lines in the detail band. SETTARGET(Report) LineLength = (?Exp:Description{Prop:LineCount} - 1) * ?Exp:Description{Prop:LineHeight} LineH = ?Detail1{Prop:Height} + LineLength LineY = (-1) * LineLength SETPOSITION(?Detail1,,LineY,,) ! Detail band ?Line1{Prop:Height} = LineH ! Vertical lines ?Line2{Prop:Height} = LineH ?Line3{Prop:Height} = LineH ?Line4{Prop:Height} = LineH ?Line5{Prop:Height} = LineH ?Line6{Prop:Height} = LineH ?Line7{Prop:Height} = LineH ?Line8{Prop:Height} = LineH ?Line9{Prop:Height} = LineH ?Line10{Prop:Height} = LineH ?Line11{Prop:Height} = LineH ?Line12{Prop:Height} = LineH SETTARGET() Printed November 24, 2024, 4:24 am This article has been viewed/printed 35355 times. Google search has resulted in 7 hits on this article since January 25, 2004. |