Date prompts for Report

Uni03

Registered User.
Local time
Today, 16:57
Joined
Jul 20, 2011
Messages
51
Good Evening - I have a report which contains meter counts for machines listed by machine number and shift. This is based on a query that prompts for a date range. The report lists at the top a total meter count by shift, only 2 lines, then the grand total of that. Next is a subreport which has a pivot chart (bar) listing meter counts by machine by shift. The top total counts and the pivot chart are run off the same query. When I run the report, I get prompted twice for the date range (start date, end date), since I am doing two separate operations off the query. I need to fix this so the user only gets prompted for the date range once when running the report. But my issue is that on the report I have a Print button and an Email button. After the report runs, and I click either to print the report or email it as an attachment, I get prompted again for the dates. I can't see why doing either of these functions causes a prompt for the start and stop dates, when the report has already run. And, if I don't supply the dates, nothing prints on the report or the email attachment of the report is blank. Any insight into this would be very much appreciared. Thank You.
 
When you print a report the query runs again so yes it will prompt you for the parameters each time you print the report.

You have two options:

1. Create a pop-up form that will act as the prompt and feed the query directly from the form (keeping the form open throughout). The form can be hidden after you enter the parameters and open the report. The criteria under the date field will change from [Enter Start Date] to a full reference to the textboxes on the form, e.g.
Code:
[Forms]![[COLOR=Red]FormName[/COLOR]]![[COLOR=Red]StartDateTextbox[/COLOR]]

Or

2. Print a report that is identical to your current report but base it on a query that get it start and end dates directly from the report. Use the same syntax as suggestion 1 above.
 
Used option 1. Thank You very much.
 

Users who are viewing this thread

Back
Top Bottom