Dynamic Dates in Report Header

niccig

Registered User.
Local time
Today, 03:19
Joined
Sep 8, 2004
Messages
29
I have a report based on a query that gives pay period information - via a form the user can select different search options for the query eg. employee, financial year etc. In the Report header I want to display two dates: the date of the first pay period, and the last pay period in the query. At no time is the user prompted for start date or end date so I can't have these parameters show on the report header. The first and last pay periods will change depending on options the user selected, or the data that's in the database.

Eg.
It's now the end of October but the database only contains pay information for July and August (I haven't imported the September information yet), so if I run the 2004-2005 financial year report now, the header dates should be 7/17/2004 - 8/28/2004.


How do I do this?
Thanks in advance.

Oh...the query the report is based on has these fields:

PayPeriodID
PayPeriodEnd (this is the date)
FinancialYear
EmployeeID
EmployeeName
Hours
GrossPay
 
Last edited:
n,

There are many ways to get your dates into your report.

One way is to just hard-code them - effective, but not efficient.

Secondly, you could use global variables, and map them to Report controls
when the report opens.

A third way is to include them in your query:

SomeParameter: [Enter Start Date]

A fourth way is to make a little popup form, which asks for the values.
The report can reference them like:

Forms![YourPopUpForm]![StartDate]

Wayne
 
Wayne,
Thanks for your advice. I already have a form where the user selects criteria for the query, so I'll just make begin and end date compulsory fields to fill in.
 

Users who are viewing this thread

Back
Top Bottom