【ActiveReports for .NET】补空白行(数据源为Dataset)

一共三种情形需要测试
1.不足一页
2.正好一页
3.超过一页
     Private   Const  iMaxGyo  As   Integer   =   8
    
Private  iCnt  As   Integer
    
Private  iRowNo  As   Integer
    
Private  iRecCnt  As   Integer   =   9
    
Private  iPageCnt  As   Integer
    
Private   Sub  arMain_FetchData( ByVal  sender  As   Object ByVal  eArgs  As  DataDynamics.ActiveReports.ActiveReport3.FetchEventArgs)  Handles   Me .FetchData

        iRowNo 
=  iRowNo  +   1

        
If  iCnt  =  iRecCnt  Then
            
If  iRowNo  >  iMaxGyo  Or  iRowNo  =   1   Then
                eArgs.EOF 
=   True
            
Else
                
Me .Fields( " COUNT " ).Value  =   ""
                eArgs.EOF 
=   False
            
End   If
            
Exit Sub
        
Else
            eArgs.EOF 
=   False
        
End   If

        iCnt 
=  iCnt  +   1
        
Me .Fields( " COUNT " ).Value  =  iCnt
        
Me .Fields( " PageCnt " ).Value  =  iPageCnt

        
If  iRowNo  =  iMaxGyo  Then
            iPageCnt 
=  iPageCnt  +   1
            iRowNo 
=   0
        
End   If

    
End Sub


Brower Current Page By web Proxys!
Brower Current Page By web Proxys!

你可能感兴趣的:(Active)