Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search criteria

Status
Not open for further replies.

spRx

Programmer
Jun 8, 2004
3
DE
Hello,

i have a little problem, hope someone can help me.
I am new in actuate and i want to filter some data
i get from the datasource. I tried to override the
fetch function:

Function Fetch( ) As AcDataRow

Dim aMasterRow As ssSAP_4x_Account_Sales_AreaDataRow

Set aMasterRow = Super::Fetch( )

If aMasterRow.ssOrganization_Id = MasterRow.ssSGL_Account_Division Then
Set Fetch = aMasterRow
Else
Exit Function
End If

End Function

The Problem: If the first Record doesn't match actuate
stops to read the other records.
(There is a loop in the report.bas i saw)

Thanks

Raphael
 
I don't have Actuate available right now so I don't remember exact syntax, but there should be something like OnFirstRow and you need to add another if:
if not OnFirstRow then
do your code
else
end if
 
Write a new function, name it GetNextRecord. Call this function from Fetch like this:
Function Fetch( ) As AcDataRow
dim row as DataRow
set row = New DataRow()
GetNextRecord(row)

set Fetch = row
End Function

GetNextRecord is like this:
Function GetNextRecord(row as yourDataRowName)
If aMasterRow.ssOrganization_Id = MasterRow.ssSGL_Account_Division then
AddRow(row)
exit do
end if
set row = New MyDataRow()
End Function

Hope it will help.
 
Sorry, I forgot, in the GetNextRecord function the code should be enclosed within a do...while loop where while condition will be checking for the EOF for the records.
The line:
set row = New MyDataRow()
should be out side the loop.
 
thank you for your help.

You 're right i required a while loop.
But unfortunately i have an other big problem.
Structure of my Report:

- Rpt1
- Seq1
-Rpt2
-Rpt3
-Rpt4
-Datastream
-Content Grp1
-Before Frm
-Rpt5

in the 4Rpt (Subreport) i fill an global variable (public and static)in the datastream fetch function. In the content
->before area i can see this value "NewReportApp::gOppo1" but in the PageFooter Frame this value is blank.. i can't understand this... Maybe 'cause i group the content area ??

I hope thats my last problem (otherwise i will start with cristal report :> )

Raphael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top