Dean L Covey
|
| Posted: 03/23/2005, 9:54 PM |
|
I have a table search grid. All works perfectly when looking at the records on the web page. Then I thought how cool would it be if I could take the same records set and put down to Excel.
So I created another page with no formatting or anthing just a table to hold the results. The problem is when I click the Excel button all the records get downloaded. The Search button works fine. Here is my code below for the two submit buttons. Am I missing something ?
'AllAddysListingSearch1 Operation Method @61-CAC52F66
Sub Operation()
If NOT ( Visible AND FormSubmitted ) Then Exit Sub
If FormSubmitted Then
PressedButton = "Excel"
If Not IsEmpty(CCGetParam("Excel", Empty)) Then
PressedButton = "Excel"
ElseIf Not IsEmpty(CCGetParam("Button_DoSearch", Empty)) Then
PressedButton = "Button_DoSearch"
End If
End If
Redirect = "Addys.asp"
If Validate() Then
If PressedButton = "Excel" Then
If NOT Excel.OnClick() Then
Redirect = ""
Else
Redirect = "AddysExcel.asp?" & CCGetQueryString("Form", Array(PressedButton, "ccsForm"))
End If
ElseIf PressedButton = "Button_DoSearch" Then
If NOT Button_DoSearch.OnClick() Then
Redirect = ""
Else
Redirect = "Addys.asp?" & CCGetQueryString("Form", Array(PressedButton, "ccsForm"))
End If
End If
Else
Redirect = ""
End If
End Sub
'End AllAddysListingSearch1 Operation Method
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 03/24/2005, 12:57 AM |
|
You would need to appy the same search criteria (Where/Table parameters) to your 2nd grid, which were applied to your 1st grid.
Basically both grids should have the same data source with the same parameters.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Dean L Covey
|
| Posted: 03/24/2005, 4:03 AM |
|

That was it!!
Perfect and Thank you.
|
|
|
 |
|