I've been able to make some improvements since last posting, but have run into new issues. Here's the background:
I have a single report that I want to run 2 different ways: no filter and with filter. The filter involves a parameter query where the user enters a date range - (((Date) Between [Enter starting date] And [Enter ending date]))).
I have a form with command buttons for each way to run the report, which point to a macro using OpenReport commands. One OpenReport leaves the filter name and where condition blank and the other points to a filter (I've also tried with just typing in the SQL under the where condition). Both reports return the correct numbers.
Here's where it gets tricky...I want to display an additional text box on the report when the filter is applied. Sounds easy, right?
1) Typically to get a parameter query entry to print on a report, you place the parameter query in a text box, right? Well, when I do that in order print the date range entered (and remove the filter from the OnOpen report command), the report tries to apply the parameter query even when the text box property is visible = no.
2) Using the visible property in general seems to be a problem. If I set the text box property to visible = no in the report, and then in the filter's macro place a command after the OpenReport command that is SetValue where I flip the text box property to visible = yes... the report asks the user to input the date range twice. So, the SetValue command triggers the filter again after it's already run on the report's OnOpen. (I should say the text box does not use the parameter query in this one, I was trying it out with just plain text)
Am I going to have to break down and duplicate all of my reports in order to run filter and no filter? Ack!
I have a single report that I want to run 2 different ways: no filter and with filter. The filter involves a parameter query where the user enters a date range - (((Date) Between [Enter starting date] And [Enter ending date]))).
I have a form with command buttons for each way to run the report, which point to a macro using OpenReport commands. One OpenReport leaves the filter name and where condition blank and the other points to a filter (I've also tried with just typing in the SQL under the where condition). Both reports return the correct numbers.
Here's where it gets tricky...I want to display an additional text box on the report when the filter is applied. Sounds easy, right?
1) Typically to get a parameter query entry to print on a report, you place the parameter query in a text box, right? Well, when I do that in order print the date range entered (and remove the filter from the OnOpen report command), the report tries to apply the parameter query even when the text box property is visible = no.
2) Using the visible property in general seems to be a problem. If I set the text box property to visible = no in the report, and then in the filter's macro place a command after the OpenReport command that is SetValue where I flip the text box property to visible = yes... the report asks the user to input the date range twice. So, the SetValue command triggers the filter again after it's already run on the report's OnOpen. (I should say the text box does not use the parameter query in this one, I was trying it out with just plain text)
Am I going to have to break down and duplicate all of my reports in order to run filter and no filter? Ack!