Exclude records in a report

G

geoff

I'm extremely new to access and reporting. I have managed
to design a report and now wish to filter certain records
within the detailed section to only include records were a
specific field is true.

How to I include such a check and were is it placed.

Any information would be greatly appreciated.

Regards

Geoff
 
N

Newbie

Is the report based on a query?
If yes, you could amend the query to look at a textbox on a form that
specifies which records are to be included or excluded.

Otherwise you can set the Filter property in the report itself - a valid
string expression also make sure to turn the Filter On property to On as
well.

HTH
 
G

Geoff

Thank you for the quick reply.

Alas i'm still lost.

The report is based on a query, so where within the report
can I specify a filter so say field=true or whatever the
command will be.

Thanks

Geoff
 
N

Newbie

If you want this report to always show the same filtered records then do the
following:

Open the report in Design View
Open the properties for the Report
On the Data tab in the Filter field enter:
[fieldname] = criteria - you may have to enclose the criteria in single
quotes ' '
Set the Filter On = On

If you want the user to be able to specify what records need to be shown
then I wouldn't use the filter - I would amend the WHERE clause of the query
on which the report is based to something like

SELECT fields FROM table WHERE fieldname =
[forms]![formname]![controlname]))

So.
1) Create a form with a control that is going to hold the data on which you
want to filter the query on
2) Add a command button that on the on click event opens the report
3) amend the query so that the where clause points to the newly created form
4) Make sure that you have removed any filters that you have added to the
report in Design mode and make sure that the FilterOn property is set to NO

HTH
 
G

Geoff

HTH,

Wow ... it almost works. The only problem remaining is
that now i have filtered out the records in the one-to-
many file, if there are no records in the one-to-many,
then i dont get any header detail, which i do need.

Hopfully this will be the last problem for this specific
report ... fingers crossed.

Thanks

Geoff

-----Original Message-----
If you want this report to always show the same filtered records then do the
following:

Open the report in Design View
Open the properties for the Report
On the Data tab in the Filter field enter:
[fieldname] = criteria - you may have to enclose the criteria in single
quotes ' '
Set the Filter On = On

If you want the user to be able to specify what records need to be shown
then I wouldn't use the filter - I would amend the WHERE clause of the query
on which the report is based to something like

SELECT fields FROM table WHERE fieldname =
[forms]![formname]![controlname]))

So.
1) Create a form with a control that is going to hold the data on which you
want to filter the query on
2) Add a command button that on the on click event opens the report
3) amend the query so that the where clause points to the newly created form
4) Make sure that you have removed any filters that you have added to the
report in Design mode and make sure that the FilterOn property is set to NO

HTH

Thank you for the quick reply.

Alas i'm still lost.

The report is based on a query, so where within the report
can I specify a filter so say field=true or whatever the
command will be.

Thanks

Geoff

on
a form that


.
 
N

Newbie

I'm not sure what you mean . . . . . ?

What do you have in the report header?
Do you have any grouping?

HTH
Geoff said:
HTH,

Wow ... it almost works. The only problem remaining is
that now i have filtered out the records in the one-to-
many file, if there are no records in the one-to-many,
then i dont get any header detail, which i do need.

Hopfully this will be the last problem for this specific
report ... fingers crossed.

Thanks

Geoff

-----Original Message-----
If you want this report to always show the same filtered records then do the
following:

Open the report in Design View
Open the properties for the Report
On the Data tab in the Filter field enter:
[fieldname] = criteria - you may have to enclose the criteria in single
quotes ' '
Set the Filter On = On

If you want the user to be able to specify what records need to be shown
then I wouldn't use the filter - I would amend the WHERE clause of the query
on which the report is based to something like

SELECT fields FROM table WHERE fieldname =
[forms]![formname]![controlname]))

So.
1) Create a form with a control that is going to hold the data on which you
want to filter the query on
2) Add a command button that on the on click event opens the report
3) amend the query so that the where clause points to the newly created form
4) Make sure that you have removed any filters that you have added to the
report in Design mode and make sure that the FilterOn property is set to NO

HTH

Thank you for the quick reply.

Alas i'm still lost.

The report is based on a query, so where within the report
can I specify a filter so say field=true or whatever the
command will be.

Thanks

Geoff


-----Original Message-----
Is the report based on a query?
If yes, you could amend the query to look at a textbox on
a form that
specifies which records are to be included or excluded.

Otherwise you can set the Filter property in the report
itself - a valid
string expression also make sure to turn the Filter On
property to On as
well.

HTH
message
I'm extremely new to access and reporting. I have
managed
to design a report and now wish to filter certain
records
within the detailed section to only include records
were a
specific field is true.

How to I include such a check and were is it placed.

Any information would be greatly appreciated.

Regards

Geoff



.


.
 
G

Guest

HTH,

Now that the detail is filtered, if there is no record in
the detail file to match the header file, then the header
detail is not showing at all. Perhaps there is a way to
just print the specific fields if a condition is true
rather than filter the detail file for the same condition.

Sorry, its rather difficult to explain.

Regards

Geoff
-----Original Message-----
I'm not sure what you mean . . . . . ?

What do you have in the report header?
Do you have any grouping?

HTH
HTH,

Wow ... it almost works. The only problem remaining is
that now i have filtered out the records in the one-to-
many file, if there are no records in the one-to-many,
then i dont get any header detail, which i do need.

Hopfully this will be the last problem for this specific
report ... fingers crossed.

Thanks

Geoff

-----Original Message-----
If you want this report to always show the same
filtered
records then do the
following:

Open the report in Design View
Open the properties for the Report
On the Data tab in the Filter field enter:
[fieldname] = criteria - you may have to enclose the criteria in single
quotes ' '
Set the Filter On = On

If you want the user to be able to specify what records need to be shown
then I wouldn't use the filter - I would amend the
WHERE
clause of the query
on which the report is based to something like

SELECT fields FROM table WHERE fieldname =
[forms]![formname]![controlname]))

So.
1) Create a form with a control that is going to hold
the
data on which you
want to filter the query on
2) Add a command button that on the on click event
opens
the report
3) amend the query so that the where clause points to
the
newly created form
4) Make sure that you have removed any filters that you have added to the
report in Design mode and make sure that the FilterOn property is set to NO

HTH

Thank you for the quick reply.

Alas i'm still lost.

The report is based on a query, so where within the report
can I specify a filter so say field=true or whatever the
command will be.

Thanks

Geoff


-----Original Message-----
Is the report based on a query?
If yes, you could amend the query to look at a
textbox
on
a form that
specifies which records are to be included or excluded.

Otherwise you can set the Filter property in the report
itself - a valid
string expression also make sure to turn the Filter On
property to On as
well.

HTH
message
I'm extremely new to access and reporting. I have
managed
to design a report and now wish to filter certain
records
within the detailed section to only include records
were a
specific field is true.

How to I include such a check and were is it placed.

Any information would be greatly appreciated.

Regards

Geoff



.



.


.
 
Top