If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information:
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply).
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information:
I have copied the provided example SQL for an sp_report into an Access pass through query. How can I modify this to allow for user prompted date ranges?
You will need to use VBA and some input boxes for the date selection or simply change the date range in your Query. Otherwise you can simply program the date range as part of the report based on the current date. See Referencing TODAY's date minus 30 days in a WHERE clause? for an example of this.
Does this mean that I cannot use the example scripts as a starting point for my reports?
I'm trying to get the Profit & Loss by Class report to show amounts by month for the last 12 months. The DateMacro='Custom' and the SummarizeColumnsBy='Month'. I'm assuming that I must use the DateFrom and DateTo fields for the user to specify a date range unless there is a way using SQL to identify which month I want to start from (current or previous) and have it go back 12 months to include a full year of data.
You will need to use VBA programming and some input boxes for the date selection and move the values into date variables and use them in the DateFrom and DateTo parameters for your sp_report.
Do you have any examples of code on how to do this? I can create the input boxes in VBA for input. I'm not sure how to get the dates entered by the user back into the stored procedure.