November 25, 2005 at 4:51 am
I have a report based on a stored procedure that prompts for criteria when run. The criteria in the stored procedure is just prompting for the required dates using the DateCreated field as follows:
DateCreated >@Beginning_date And <@End_date
This works fine but I want to be able to show the dates that have been entered on the actual report so that the user can see the date range the report figures refer to.
Any help would be much appreciated.
November 26, 2005 at 9:06 pm
Simple insert your parameters into the query
Select @Beginning as BeginningDate,@End_Date as EndDate, .. then the rest of your SQL.
November 30, 2005 at 5:58 pm
Use the query by form method plenty of posts on the web about that, create a dialog Form to open the report setting the input parameters of the Report to the textboxs on your criteria dialog form ie: @BeginningDate=Forms!YourFormName!YourTextBoxName,@EndDate=Forms!YourFormName!YourTextBoxName. Then on your report set the controlsource of a couple of unbound textboxes to the value of the criteria textboxes using he same method ie: on the reports unbound textbox enter =Forms!YourDialogCriteriaFormname!Yourtextboxname. Doing it This way the values remain within the gui of access and are passed from form to report without roundtripping to the server to retrieve the parameters as part of your dataset
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply