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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Report off Form Filter

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
0
0
GB
I have filtered information in a form and now want to preview a report showing only the filtered information.

Any ideas on this one?

I'd quickly like to thank everyone whose helped me so far,

Thanks,

Woody.
 
The best way to do this is by mirroring your filter criteria to the query that generates the result table for the report. Then open the report. If you've hidden the toolbar, you may want unhide it so the user can then print the report.

Mac

 
Another simple way is to apply the exact same filter to the report. eg.

var
r report
endvar
;assuming you've already set up filter in criteria

; load report hidden in design mode
r.load(-reportname-, winstylehidden)
; note: report must be .rsl not delivered

r. -tableframename- .setgenfilter(criteria)
; apply the filter to tableframe object (or other object)

r.run()
r.bringtotop()

hth,
Richie
 
I just noticed from an earlier post of yours that you probably don't have the filter variable. In this case use getgenfilter in the form.

var
r report
criteria dynarray[] anytype
endvar

; capture the filter criteria
-tableframeobject-.getgenfilter(criteria)
; the rest is the same
r.load(-reportname-, winstylehidden)
r. -tableframename- .setgenfilter(criteria)
r.run()
r.bringtotop()

hth,
Richie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top