Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Height Resize on Report

Status
Not open for further replies.

TuzMwaura

Programmer
Feb 3, 2011
27
KE
I am trying to resize a line height in a report detail based on a resized text control height, but I cant seem to get it. Any ideas to do this?
 
Sometimes when I have these problems. use more than one Detail. The one I put the data and the other (f.e. ?linedetail), I have only line, which print control according to a condition.
PRINT(?DETAIL)
PRINT(?LINEDETAIL)
See the Source code in te embeds.
I hope to serve you the answer.
Eduardo
 
Hi Tuz,

Doesn't Report$?Detail{PROP:Height} = <New Height> work?

Or, are you talking about Report$?TextBox{PROP:LineHeight} = <New Height>? PROP:LineHeight is a READ ONLY property for text boxes.

Regards
 
Hi Shankar,

I am trying to do this on the report where I have a text control that is set on resize mode, so the height of the text control is dynamic based on the number of characters on it.

However , I have been trying to resize a a vertical line to re- align with the text control height that haven't seemed to work for me yet.

May be am putting this on the wrong embed position. I have my code under process manager Take Record just before the PRINT(RPT:Detail) is called.

LineCount# = Report$?POL:CoverSummary{PROP:LineCount}
Report$?Line:CSRH{Prop:Height} = Report$?Line:CSRH{Prop:Height} + LineCount#

Will be gratefull for any help

Tuz
 
I got it working. my SetTarget(Report) was placed in the wrong embed point

Here is my code, for those who might use such an idea

SetTarget(Report)
Report$?Line:CSRH{Prop:Height} = Report$?Line:CSRH{Prop:Height} + Report$?POL:CoverSummary{PROP:LineCount} * 300
SetTarget()

!Report$?POL:CoverSummary{PROP:LineCount}
!Gets the number of lines in a text control

 
Hi!

You do not need SETTARGET() if you are using Report$.

And, it should be ::

Code:
Report$?Line:CSRH{Prop:Height} = Report$?Line:CSRH{Prop:Height} +  (Report$?POL:CoverSummary{PROP:LineCount} * Report$?POL:CoverSummary{PROP:LineHeight}) + 50

since 300 will not work for all fonts.

You can fine tune the 50 based on the font you use.

Regards
 
Thanks Shankar,

Apparently it seems to work now. Still using SetTarget(Report), without SetTarget the report is falling to resize my lines,

Thanks for tips about fonts.

Tuz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top