Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 11 Monaten
Letzter Beitrag:
vor 5 Jahren, 6 Monaten
Beteiligte Autoren:
Chris L, Erik Schwarz

[WD16] Break in window does not work as expected

Startbeitrag von Erik Schwarz am 08.08.2012 10:07


just trying the breaks in a table control (let us call it 'TABLE_Test')

creating breaks -> ok
put a static control, named STC_Text, inside break header -> ok

in break display process:

STC_Text = TABLE_Test.Info[TABLE_Test] -> ok (all headers show the same text)

TABLE_Test[TABLE_Test].STC_Text = TABLE_Test.InfoTABLE_Test] -> problem

This is the same structure like in the example in the help. :spos:

Error message: 'STC_Text' element not found in 'TABLE_Test' element.

I edited back and forth several times, suddenly it worked, but cannot get it work again after deleting and rewriting the code line.

Anybody out there with the same problem or a solution?




I've come across exactly the same problem in WD16.

In an application I wrote in a previous version of WD, I used the code:

TABLE_Dates[TABLE_Dates].STC_Static1 = TABLE_Dates.COL_MonthYear[TABLE_Dates]

and this worked perfectly.

I tried to use exactly the same method in an application I'm currently writing thus:

TABLE_Meeting[TABLE_Meeting].STC_BreakHeader = TABLE_Meeting.COL_Date[TABLE_Meeting]

but I get nothing.

Like you, if I try

TABLE_Meeting[TABLE_Meeting].STC_MeetingBreakHeader = "Some text"

then I get "Some text" appearing in the break header but it appears the same in every break header. Not what I want.

I've tried fiddling round with this in all sorts of ways but cannot get it to work at all. Very strange and very frustrating since it worked very well in the past.

Did you manage to come up with a solution? Has anyone else come up with a solution for this?

Chris L
Melbourne, Oz

von Chris L - am 20.12.2012 02:31
Funny how it works out. Just posted this message after much frustration trying to get this to work. Then tackled the problem again and solved it!

In trying to track down where variables were being assigned, values picked up, etc, at one point I split the single line:

TABLE_Meeting[TABLE_Meeting].STC_BreakHeader = TABLE_Meeting.COL_Date[TABLE_Meeting]
into two.

First I assigned the value from the table to a program variable thus:

dDate is date = TABLE_Meeting.COL_Date[TABLE_Meeting]

Then I assigned the static in the break header to this variable, like so:

TABLE_Meeting[TABLE_Meeting].STC_BreakHeader = dDate

This works fine.

So instead of the single line:

TABLE_Meeting[TABLE_Meeting].STC_BreakHeader = TABLE_Meeting.COL_Date[TABLE_Meeting]

which worked fine in earlier versions of WD, I now have to use two lines

dDate is date = TABLE_Meeting.COL_Date[TABLE_Meeting]
TABLE_Meeting[TABLE_Meeting].STC_BreakHeader = dDate

No great hardship, I admit, but I'm used to WD going forward in each version and in this case, something has actually gone backwards. Interesting.

Chris L
Melbourne, Oz

von Chris L - am 21.12.2012 06:39
Hi Chris,

thanks for your efforts, I didn't work longer on this subject. In fact, I didn't use it.
Now there is some light coming down.
Yes, now I remember sometimes I had have this effect in other circumstances, too.
Always when assigning some complex expressions to other complex expressions (means no single variable, but table fields or structure variables and so on).
I splitted them just to use the debugger and then it worked, but could not see any systematic in it.

So, keep in mind, if

complex expression 1 = complex expression 2

does not work, then use

single variable = complex expression 2
complex expression 1 = single variable

happy christmas and a good new year


von Erik Schwarz - am 21.12.2012 07:40
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.