Filtering in a subreport from an unbounded report

  • Thread starter Thread starter Eric Caron
  • Start date Start date
E

Eric Caron

Hi,

Just like the subject says, I'm trying to apply a filter to the data in
a sub-report from an unbound report. I'm am calculating fields on the
Open event of the report and I am taking OpenArgs to filter down the
records.

Or is there a way to auto-size a label on a report? That would save me
the trouble of using sub-reports in the first place.

Any help appreciated.

Eric
 
Eric said:
Just like the subject says, I'm trying to apply a filter to the data in
a sub-report from an unbound report. I'm am calculating fields on the
Open event of the report and I am taking OpenArgs to filter down the
records.

Or is there a way to auto-size a label on a report? That would save me
the trouble of using sub-reports in the first place.


You are probably better off using a form control to hold the
parameter value and using the subreport's record source
query's criteria to filter the data. But that may not be
applicable to whatever you are trying to do with whatever
the filter is supposed to accomplish.

The issue with setting either a subreport's record source or
filter properties is that it can only be done in the
subreport's Open event and even then only the first time the
subreport appears in the main report. This is easily
managed sing code like:

Static Initialized As Boolean
If Not Initialized Then
Me.Filter = " . . . "
Initialized = True
End If
 
Back
Top