Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve compute-field from header 1

Status
Not open for further replies.

elnbado

Programmer
Oct 31, 2005
3
NL
My problem:

I have a datawindow with a header which contains a computedfield. When I click this field, I want to get the value of this field, for that group.

So:
Header: Client X number + other stuff
--
Detail
order 1
order 2
etc.

Header: Client Y number + other stuff
--
Detail
order 1
etc.

When I click on the header (computed field), the getClickedrow() returns 0.

How do I relate the value from the computed field to the iteration for the client, i.e. how do I get the client number so I can use getItemString( [row for group ], column)?

Can it be done? I tried to use some hidden fields to store the getrow() per group and per report. But I have not found a way to count the number of times the groups occurs.

Any suggestions?

Thnx in advance!
 
Getclickedrow only works for rows, not any bands (header, groups, footer, etc.). The following is from the online books (Chapter 4 Accessing Data in Code):
Code:
Row numbers for computed fields 

When you refer to a control in a band other than the detail band (usually a computed field) you still specify a row number. For the header, footer, or summary, specify a row number of 1. For the group header or trailer, specify the group number:

dw_1.Object.avg_cf[1]
//'avg_cf' refers to a computed field on dw_1

Matt

"Nature forges everything on the anvil of time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top