HEADER and FOOTER codeblocks

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

HEADER and FOOTER codeblocks

#1 Post by reganc »

Roger

Are footer and header codeblocks meant to refresh their values every time a dc_getrefresh() is done?

We put totals into the footers of some columns. As they can be defined as codeblocks, I presumed their values would be refreshed in a similar way to the way DCSAY and DCSTATICs are done. But they're not.

Am I missing something?

As a workaround I have done a loop round the column objects, getting the footer blocks, evaluating them and then pasting them in the footer cell using setcell following by an invalidaterect().
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: HEADER and FOOTER codeblocks

#2 Post by rdonnay »

I thought it was supposed to work that way too.

The method DC_XbpColumn():refresh() will do what you want but only for a specified column.

To update all columns would require this:

Code: Select all

FOR i := 1 TO oBrowse:colCount
  oBrowse:getColumn(i):refresh()
NEXT
I have added the following code to the DC_XbpBrowse:refresh() method in _DCXBROW.PRG. This is called by DC_GetRefresh(). I recommend that you do the same and rebuild DCLIPX.DLL, otherwise use the code shown above in your application code.

Code: Select all

FOR i := 1 TO ::colCount      <<<<<<< new
  ::getColumn(i):refresh()    <<<<<<< new
NEXT                          <<<<<<< new

::refreshAll()
This change will be in build 264.
The eXpress train is coming - and it has more cars.

Post Reply