471,859 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,859 software developers and data experts.

Form to filter reports

1,430 Expert 1GB

Frequently we need to generate reports with one or more "From & To" ranges. Often the method of entering this range is to use an input box to enter criteria for the underlying query. I consider this not to be very professional, and prone to input errors.
If your database contains a number of these "From & To" reports, there must be a better method.


The thought occurred to me to use one input form, which changes it's appearance according to the information required to set up the filter for the report. Additionally, after entering the From & To Values, these should be passed back to the report to show the ranges in the header.


Here is a picture of the form in Design View.

So far, I have not needed more than 1 Combo Box and 1 Text Box, so the Range 2 controls are not used.

On opening the report in PrintPreview, initially it is hidden.
This passes 32 pieces of information to the "ReportFilterForm" to tell the form how many pairs of Combo Boxes and Text Boxes to show, sets titles, field widths, SQLs for Combo Boxes, Default values, prompts etc.

So when it opens, the form looks like this:

It shows only the number of Combos or Text boxes as required by the report, and the form's height gets adjusted accordingly.

After filling in the ranges we get

The header of the final report shows the ranges selected in by the form.

I think this concept may be useful, and would welcome any comments and suggestions.

Aug 4 '16 #1
0 829

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by Nothing | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.