Enable report users to select fields to display & search criteria

I

Igor

Hello,

I'm hoping that one of you can answer these two questions:

1) Is there a way to allow users to select what fields they want to see in
the results?

2) How can I include a search criteria in a report? [For example, a) search
only for letters with the word "accident" in the title, b) search only for
letters sent between two dates.]

I would appreciate all the help I could get.
 
A

Allen Browne

Re 1:
No, not really. You could set up a report that handles all the fields you
might need, and then use code in the report's Open event to show/hide the
controls and resize them to fit available space.

However, in a normalized database, you don't do that kind of thing very
often.

Re 2:
See:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
The example shows how to build a filter string, and apply it to the search
form. You can do exactly the same thing, and apply it to the WhereCondition
of OpenReport.
 
I

Igor

Thank you very much, Allen!
--

igor


Allen Browne said:
Re 1:
No, not really. You could set up a report that handles all the fields you
might need, and then use code in the report's Open event to show/hide the
controls and resize them to fit available space.

However, in a normalized database, you don't do that kind of thing very
often.

Re 2:
See:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
The example shows how to build a filter string, and apply it to the search
form. You can do exactly the same thing, and apply it to the WhereCondition
of OpenReport.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Igor said:
Hello,

I'm hoping that one of you can answer these two questions:

1) Is there a way to allow users to select what fields they want to see in
the results?

2) How can I include a search criteria in a report? [For example, a)
search
only for letters with the word "accident" in the title, b) search only for
letters sent between two dates.]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top