Actuateclub.com

 

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

Techieindex

 
Display Control Only Once

 Display a control dynamic depending on 2 details sections

Report Logic :

 
The following code hides a control , i.e. displays only once in a detail frame. The SQL of the report brings multiple rows, But we need only the first row. The code in the fetch method looks for continues defected & the loop skips all other similar defect id's.   Example and location of the Code is in the QryFailByInbox this code is used to skip the duplicate rows from the SQL.
Sample Code: (Fetch method of QryFailByInbox)

Function Fetch( ) As AcDataRow
   Dim aRow as drowFailByinbox

  'set fetch = Super::Fetch( )

     Do While True
    Set fetch = Super::Fetch( )
 
 

   If fetch is Nothing Then
   lastrecordcheck = True
   Exit Function 
   End IF

   If trim(str$(fetch.getvalue("sw_case_swcaseid"))) = "" Then
   Exit Function
   End IF

   if isnull(fetch.getvalue("sw_case_swcaseid"))and

  isnull(fetch.getvalue("sw_resolution_swresolutionid"))then
  lastrecordcheck = True

                         End IF

  If fetch.getvalue("sw_defect_swdefectid") <> ppDefectId 
 then
                       Exit Function
                                                     End If 

   Loop
             ' Insert your code here
  End Function


' This code is used in the control which is needed for hiding the control from the view.   DayDisplayFlag determines whether the control to be Hidden or not.


 If DayDisplayFlag then
   me.text = "Days Old"
   DayDisplayFlag = False
 End IF

         ' Insert your code here
 End Sub

' For Control Hiding in FRMBEFORECASE Control


  Sub OnRow( row As AcDataRow )
  Super::OnRow( row )

  If DayDataDisplayFlag then
    DataValue = DaysOldValue
    DayDataDisplayFlag = False
    DayframeHide = True
   ' lastrecordcheck = True
  End IF
  

         ' Insert your code here
   End Sub

 

 

 

 

Copyright © 2008 Techieindex