afrausto
Posts: 66
|
| Posted: 09/11/2005, 11:09 PM |
|
Hello,
I've been trying to get this Simple Report by Group Headers example to work but the header always displays. The example tells you to add the following code in the Before Show Row of the Grid. Although the logic is correct, the variable DepName is always reset to nothing for each row and the comparison always fails, hence the display of duplicate group headers.
Dim DepName
Function departments_BeforeShowRow()
If DepName = departments.department_name.Value Then
departments.department_name.Visible = False
Else
departments.department_name.Visible = True
DepName = departments.department_name.Value
End If
End Function
Here's the link to sample in the docs: http://docs.codecharge.com/studio/html/index.html?http:...eaders.html?toc
I'm using CCS / ASP.
What am I missing here? Is there a working example I can take a look at ?
Thanks for your help.
|
 |
 |
Edd
Posts: 547
|
| Posted: 09/12/2005, 8:17 AM |
|
Are you sure that the
Dim DepName
is outside the function?
The reason is that it needs to be a global variable.
If it is please show your HTML for the Row.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
afrausto
Posts: 66
|
| Posted: 09/12/2005, 9:01 AM |
|
Edd,
After reviewing what you wrote and testing it again, it finally worked like it's suppose to. 
Thanks for the fresh eyes.
|
 |
 |
|