Actuateclub.com

 

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

Techieindex

 
Dynamic building of rows
In this design we run the controls dynamically at run time. 
Description
In this design we creating controls through coding. First we declare 3 TextControls Then declare the position, size and width of the TextControl through coding.
First of all create a simple report with one frame, a connection and sql component.

Then select the frame in content section and press F11 to get its property and select its method tab. 

Select “Function BuildFromRow( row As AcDataRow ) As AcBuildStatus” and click Override button.
Type the remaining lines to the function before BuildFromRow = Super::BuildFromRow( row )

Super::BuildFromRow( row )
 
Dim loTextCtrl2 as AcTextControl

Dim loTextCtrl3 as AcTextControl

Dim loTextCtrl4 as AcTextControl

Dim kount as Integer

kount=1

for kount = 1 to 3

Select Case kount  

Case 1

 Set loTextCtrl2 = New Persistent AcTextControl

    loTextCtrl2.Position.X=1000

    loTextCtrl2.Position.Y=200

    loTextCtrl2.Size.Width=1000

    loTextCtrl2.Size.Height=250

    loTextCtrl2.BackgroundColor=Cyan

     loTextCtrl2.DataValue=row.GetValue
                                 ("address_AddrHouse")

    AddContent(loTextCtrl2)

 Case 2

Set loTextCtrl3 = New Persistent AcTextControl

    loTextCtrl3.Position.X=2000

    loTextCtrl3.Position.Y=100

         loTextCtrl3.Size.Width=1000

         loTextCtrl3.Size.Height=250

        loTextCtrl3.BackgroundColor=Cyan

       loTextCtrl3.DataValue=row.GetValue
                                      ("address_addrPlace")

     AddContent(loTextCtrl3)

 

 Case 3

Set loTextCtrl4 = New Persistent AcTextControl

    loTextCtrl4.Position.X=3000

    loTextCtrl4.Position.Y=200

    loTextCtrl4.Size.Width=1000

    loTextCtrl4.Size.Height=250

    loTextCtrl4.BackgroundColor=Cyan

    loTextCtrl4.DataValue=row.GetValue
                          ("Address.AddrName")

      AddContent(loTextCtrl4)

   End Select

   next kount   

BuildFromRow = Super::BuildFromRow( row )

    ' Insert your code here

End Function


BuildFromRow:    This function create the  controls that use data rows.
 

 

 

 

 

 

Copyright © 2008 Techieindex