Normal Topic Reports and Sub-Records (Read 357 times)
MP
Full Member
***
Offline



Posts: 104
Joined: Sep 3rd, 2007
Reports and Sub-Records
Mar 11th, 2008 at 11:48pm
Print Post Print Post  
What is the preferred way of retrieving the sub-records that are related to a record being output in a Report?  I tried using @XResultSetCurrentForm() to get the handle to the result set of the report, but it didn't work for me.  I ended up re-doing the search on each row to get the Result Set pointer for the current record, and then I used that to grab the sub-records.  Although it works fine, I'm skeptical I'm doing this the right way.  My code is as follows:

Code
Select All
vintResultSet = @XResultSetSearch( @FN, "Table", SEARCH_MODE_AND,SEARCH_SYNTAX_QA, "!fTableID=" + txtTableID)

//vintResultSet = @XResultSetCurrentForm()
If @XResultSetTotal( vintResultSet ) = 1 Then
{
	vintResultSetSubSet = @XResultSetSubSet( vintResultSet, "fsubTableHistory" )
	  //blah blah blah
}
 

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Reports and Sub-Records
Reply #1 - Mar 12th, 2008 at 1:08am
Print Post Print Post  
You're doing it right.  Smiley
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged