SqlQuery total, print and Excel options

SqlQuery is a new library that can be used to add much improved data browsing features to your applications. It is based on new features that are being added to eXpress++ build 267 and later - expected release August, 2019.
Post Reply
Posts: 13
Joined: Sat May 11, 2013 3:46 pm

SqlQuery total, print and Excel options

#1 Post by richardc »

I tried Roger's new total, print and Excel options in SqlQuery today. All SqlQuery options are now embedded in my code. I have to say, this is an outstanding tool.

I am about to the point where I am going to display all data to users and let them "work it" to get the data they want using SqlQuery options. This will cut my work time creating custom/user defined reports.

Thanks Roger. Keep new features coming!


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

Re: SqlQuery total, print and Excel options

#2 Post by rdonnay »

Richard and I have worked together for months to improve the browsing capabilities of DCBROWSE and DCBROWSECOL.

These features have been added to SqlQuery to improve it as a SQL and ISAM database tool.

Today, we determined that the performance of the browser in SqlQuery is too slow if there are too many
browse columns being created. For example, a database with 100 fields will create 100 browse columns
if using SELECT * (SQL mode) or USE (ISAM mode). I determined that it would be best if only the first 20
columns are created and the remaining are "cached". The user can then choose a column to add to the
browse by selecting one from the cache. Here is how I implemented this feature. it works great!

I Added a new CACHECOLUMN clause to the DCBROWSECOL command. This will not add the column to the
browse until a new method of the DCBROWSE class is called - oBrowse:chooseCachedColumn(GetList)

I also added a new CACHECOLUMNS <nColumns> clause to the DCBROWSE command. This will insure that
columns which have a position greater than <nColumns> will be cached.

If you want to automatically add the next cached column to the browse when the user right-arrows past the
last visible column, simply add the following code to your custom handler. This will also automatically add
columns when the user right-scrolls with the scroll bar past the last column.

Code: Select all

STATIC FUNCTION BrowseHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList, oBrowse )

LOCAL lPan := .f.

IF (oXbp == oBrowse .AND. nEvent == xbeBRW_Pan .AND. ;
      oBrowse:hScrollObject:getData() >= oBrowse:hScrollObject:setRange()[2])
    lPan := .t.
IF lPan .OR. (oXbp == oBrowse .AND. nEvent == xbeP_Keyboard .AND. oBrowse:colPos = oBrowse:colCount)
  IF lPan

This feature can be used in all existing applications.
The eXpress train is coming - and it has more cars.

Post Reply