Vijay Raghavan
Vijay Raghavan

Reputation: 53

Reading crosstab datawindow column header value in powerbuilder

I am trying to read the value of a crosstab datawindow column header in powerbuilder 12.5.1.

I have a clicked event on the datawindow in which I am using the following code to retrieve this information.

IF ( dwo.type = 'text' ) THEN
    ls_name = dwo.name;
    IF LEFT(ls_name, 8) = 'ergebnis' THEN
       ls_colvalue = this.describe(ls_name + '.text');
    END IF;
END IF;

In case if I have three columns, it works perfectly to get the value(text) of that column header for the second and thrid column. But for the first column it returns the name of the the column header as '@assaykey' and not its value.

The crosstab datawindow successfully displays the said @assaykey value, but it does not retrieve this value in the 'clicked' event only for the first column. This problem occurs only in one crosstab datawindow, there are others used in the project which works perfectly fine. Am I missing or forgetting some configuration here ?

I hope I have explained my problem clearly, any suggestions to improve my question are welcome. Please let me know if more details are required in order to understand the problem.

Upvotes: 2

Views: 1877

Answers (1)

Vijay Raghavan
Vijay Raghavan

Reputation: 53

I added the line shown below in the event that initializes the datawindow.

dw_data.modify('datawindow.crosstab.staticmode=yes');

This has to be added right after the command to retrieve data from the datawindow.

Upvotes: 3

Related Questions