cgosbee
Posts: 23
|
| Posted: 12/21/2007, 2:53 PM |
|
I have a report in which there are some dependent listboxes. These are working fine. (Selecting an item in one submits the page, which then loads properly with any dependent listboxes populated with the filtered data)
Running the searches works fine.
The only thing I need/want to do that I can't seem to sort out is this:
I only want the Search results (report results, actually, although I don't believe this is really any different) to display if/when someone clicks the Search button. I can't require any of the search criteria, as searching for all items is valid in this report.
I managed to stop it from running by adding "?run_search=N" to the link that goes to this page, and then checking this parameter in the "Before Execute Select" event of the search results grid. (I.e. If run_search parameter is "N", I set one of the parameters of the WHERE clause to an "impossible" value) I can't figure out how to make sure that run_search=N all the time, except when Search is clicked.
Is this possible, or am I really just going at this the wrong way?
I'm using PHP.
|
 |
 |
datadoit
|
| Posted: 12/21/2007, 5:27 PM |
|
You could just check for the existence of the query string:
if (strlen(CCGetQueryString("QueryString","")) < 1) {
$Results->Visible = false;
}
|
|
|
 |
|