Actuateclub.com

 

  About Actuate   |   Forums   |   Message Board  |   FAQ   |   Jobs    |   Actuate 100   |   Guest Book  |   Feedback  |   Sitemap   |   Home

Techieindex

 
Dynamic resizing & Control of Frame

 Expanding the size of a control & frame with variations of Datavalue

Report Logic :

 
       This Report design expands a text control according to the datavalue. The code for the control expansion is written at the report frame level. First we need to determine the values of the data. If it is bigger expand the frames and controls. If a text control needs more line of out put then  the control has to be made dynamic.
Sample Code:

Create a field (notes) in the sfdata which is having the length of 250 characters in customers table. Make a report with customer name ,  txtnotes(for expandable control)and home numbers. Override the BuildfromRow at the frame level of txtnotes control.

Function BuildFromRow( row As AcDataRow ) As AcBuildStatus
   BuildFromRow = Super::BuildFromRow( row )

 Dim szText As String
 Dim nLinesNeeded As Integer
 Dim nNumOfChars As Integer
 Dim control As AcTextControl

 szText = GetcontrolValue("SWCOMMENTBMLONGNOTEControl")    
nNumOfChars = Len(szText)
if nNumOfChars > 70 then
   nLinesNeeded = (nNumOfChars/70)+2
   Size.Height = Size.Height*nLinesNeeded
   Set control = findContentByClass("SWCOMMENTBMLONGNOTEControl")
   control.Size.Height = control.Size.Height*nLinesNeeded
end if
End Function

 Example & location of the Code
 

 

 

Copyright © 2008 Techieindex