Showing date range on report

scottmfitzge

Registered User.
Local time
Today, 20:47
Joined
Jun 3, 2008
Messages
31
Hi... I have created a report to show a particular date range of data. When i run the report, i am asked for a start date and end date. I have achieved this by adding the following simple expression into the report query underneath the date field:

>=[Start Date] And <=[End Date]

This way i am prompted for the required "Start Date" and "End Date". However, i want to show the start date and end date entered on the top of my report, so the user who views the report can see the date range, as the dates are not shown in the body of the report. I want it to be shown as: "Date Range: 02-06-2009 to 10-06-2009" Is this possible? or even just to get the dates showing...:)

Thanks for your help
Cheers, Scott
 
Because you are using parameters in your query to filter the data it is hard to pass the values to the report. Have you not tried entering the dates into textboxes on a form and using these datas for filtering. This way you can do what you want to do.

There is a demo with full documentation in the sample databases section called passing public variables that should help you.

David
 
Hi David - Thanks for your advice - the document you pointed me to, is most helpful, however would you be able to provide me with some additional guidance, as i am unsure of how to perform step 1 (creating two variables in the startup module) and step 2 (creating two new functions)? - This is what i am stuck on.

Cheers, Scott
 
Actually, I believe, based on what pbaldy has shown before, that you can create a text box on the report's header and set it to be:

="From " & [Start Date] & " to " & [End Date]

and as long as each parameter part matches with what you are calling in the underlying query, it will show up. And I just tested it again and it works fine.
 
Thanks. I can use this option elsewhere in my DB, however I would like to know how to do Step 1 and 2 from 'DCrake's' example, as I think this would work better as I will have to run a number of reports, and using this option will mean I only have to enter the start date and end date once. I would really appreciate explanation as to how I can do step 1 and step 2. Thanks so much both. Cheers, Scott
 
Thanks. I can use this option elsewhere in my DB, however I would like to know how to do Step 1 and 2 from 'DCrake's' example, as I think this would work better as I will have to run a number of reports, and using this option will mean I only have to enter the start date and end date once. I would really appreciate explanation as to how I can do step 1 and step 2. Thanks so much both. Cheers, Scott

Here's a sample database from my website.
 
Thanks Bob, I will take a look, Have a try and let you know how I get on.Cheers, Scott
 

Users who are viewing this thread

Back
Top Bottom