Topic: Query for report

I am getting ready to create my first report.

What I need is a form that the user can enter some criteria. It will probably be a combobox, a date field, and probably a checkbox or two.

I then want to use that criteria for the report.

I don't know the best way to do that. Is there a way for my app to create the query text based on the criteria and pass that to the report?

Don't know best way to accomplish this.

Thanks

Re: Query for report

Hi,
Please have a look at the attached (specifically, both 'printer' icons on the main form).  There are 2 basic approaches.
1.  use the selection criteria on Form1 to filter records on the grid.  Then click on the first printer icon to view the report.
2.  click on the second printer icon and use Form3's selection criteria and then view the report.
The first enables you to see what records will be passed to the report whereas the second takes you straight to the report (what, in effect, happens with the second method is that an invisible grid is filled according to your selection criteria).
As you can see, the logic is identical in both approaches.  Which method you choose depends on your requirement.
Derek.

Post's attachments

Attachment icon asawyer.zip 634.13 kb, 223 downloads since 2020-12-09 

Re: Query for report

Thanks so much.

I think I understand now.