Actuateclub.com

 

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

Techieindex

 
Handcoding the query
In this design we run the controls dynamically at run time. 
Description
In this design we build the query by coding.
In the Content Slot place Report Section from Structure Palette.

In connection slot place connection component and select AcodbcConnection from Select Component Dialog

In component properties dialog set datasource to egData.
In DataStream slot place Query component and double click on it.
In Component change the super class of class as AcDataSource  and  create two class variables
In DataRow slot place DataRow from Data Palette and double click on it.
In component variable create two class variable col1 and col2 as variant. Set it storage as instance and also set the visibility as public
Drag a frame to the Content Slot.
Double click the Query component  and select Start( ) function from the method tab,  click Override button.
Type the remaining lines to the function after Start = Super::Start( ) 
Dim Sqlstmt as String  
                 Sqlstmt="select AddrNumber from Address" 
              
                OpenCursor( Sqlstmt )
Also select “Sub BindDataRow()” from method tab and click  Override  button and type the remaining lines after  'Super::BindDataRow( cursor ).    

 Cursor.BindColumn
             (1,"Design20::DataRow","col1") 

                
       Cursor.BindColumn
            (2,"Design20::DataRow","col2")
 

BindDataRow:     If we change the  super class of
Query class as AcDataSource  , you must override the BindDataRow( ) this function using to binding between  row fetched  by the cursor and the data row .

 

 

 

 

 

 

Copyright © 2008 Techieindex