Best Way to Create Filters on a Report (1 Viewer)

alan_mitchell

Registered User.
Local time
Today, 05:37
Joined
Nov 25, 2008
Messages
11
Hi all,

Here's my situation.

I have a report (Report_1) based on a query (Query_1) which contains the following fields:
  • Staff name (text)
  • Manager name (text)
  • Location (text)
  • Client (text)
  • Key client (yes/no)
  • Date payment due (date)
  • Overdue (yes/no)
I want to create some sort of filtering interface at the top of the report, which lets users filter records from a particular location, staff member, overdue status etc.

The user should be able to filter only the fields he wishes, such as showing all clients from UK, or all clients belonging to Joe Bloggs that are overdue.

Any ideas on the best way to approach this?

Cheers,
Alan
 

Alansidman

AWF VIP
Local time
Yesterday, 23:37
Joined
Jul 31, 2008
Messages
1,493
I would use a search form with a command button to execute the report based upon query. The search form would list the parameters for your fields in the query. Look at this web site on how to set up the search form and enable the query. From there, it should be easy to set up a command button to execute the report.

http://www.datapigtechnologies.com/flashfiles/searchform.html

Hope this helps you get where you need to be.

Alan
 

alan_mitchell

Registered User.
Local time
Today, 05:37
Joined
Nov 25, 2008
Messages
11
Thanks Alan,

A few questions though:

1. When some of the fields are left blank, it doesn't filter for those fields. If the default value is "", how does it show all records? Why does it show records which contain data and not ones that are null?

2. Would this method work with combo boxes?

Cheers for your help,
Alan
 

Alansidman

AWF VIP
Local time
Yesterday, 23:37
Joined
Jul 31, 2008
Messages
1,493
By using the like statement in your criteria, it will show the records. Mike explains that in the video.

As to combo boxes, why not. Use the unbound search field as a look up on a table. Then have the query look to that search box. If you need more information on how to do this, post back or look at combo boxes and the form filter presentations at www.Datapigtechnologies.com

Alan
 

Users who are viewing this thread

Top Bottom