Other Topics

Expressions

WebQuery expressions - both for creating calculated columns and when used for selection - are based on Sture Andersen's cExpressionParser class (the source can be found in StureApsPublicLib) which is still somewhat experimental. For WebQuery we have expanded some of its definitions in the cWqExprParser class, adding some functions and one new operator.

The new operator is "&", which WebQuery understands as a string concatenation operator (this is in addition to the rather clumsier "Concat" function which is also added) - use this rather than "+" to join strings together.

Because of the experimental nature of these expressions, they should be used with care and you should not be too surprised if they don't perform exactly as you would wish.

If you do have problems with them, please report them with an indication of how to reproduce them (ideally using something standard like the WebOrder sample).

Ad Hoc Indices

Ad hoc indices can be very useful, but they come with a significant performance overhead, because the records must first be read, then sorted in memory by the WebApp process before being output.

For relatively small data sets, this is generally a bearable amount of time, but once several thousand rows are involved the time taken to do this can start to get out of hand. For much more than a few thousand rows it may prove impractical to use ad hoc indices.

UI Performance

Our philosophy when writing software is generally "get it working first, then get it working fast". WebQuery is now (mostly!) working, however it is still passing too much data back and forth between the UI (user interface) in the browser and the WebApp on the server. This does not produce a serious issue when the browser and server are on the same machine (where performance is really pretty good) or on a fast local area network, but over a connection with significant network lag it results in rather soggy performance in the UI. Hopefully this will be addressed in future releases.

"Report Processing..." waiting dialog

It would be nice if while the WebApp at the server was processing a report, the user had an indication that something was happening. We will look into providing this in future.

But I want PDF output!

WebQuery does not offer PDF output, however you can achieve this by running a report in the Google Chrome web browser to a new browser tab or new browser window (Chrome will - at time of writing - actually open a new window for either option) then use "Print" (click on the top-left Chrome icon and select "Print", or right-click on the report and select "Print"), in "Destination" click "Change..." and select "Save as PDF", then click the "Save" button.

Unless your previously selected printer from Chrome was a colour printer, the resulting PDF will only be in black and white however.

Extensions to the WAF

WebQuery required two minor extensions to the Web Application Framework.

  1. An extension of the df.WebEdit/cWebEdit (to df.wqWebEdit/cWqWebEdit) class to provide the additional ability to get and set the caret (text cursor) position programatically from within the web application. This can be accessed using WebGet/WebSet piCaretPosition. This is used in the expression editor.
  2. An extension of the df.WebApp/cWebApp (to df.wqWebApp/cWqWebApp) to give more control (in some browsers anyway) over the features present in new browser windows. These are set using the message "Set NewWindowOption {option} True/False" (of your cWqWebApp object) prior to sending the "NavigateNewWindow" message. The various options are:
    • C_nwMenuBar - menubar
    • C_nwScrollBars - scrollbars
    • C_nwStatusBar - status (presence of a status bar)
    • C_nwTitleBar - titlebar
    • C_nwToolBar - toolbar
    • C_nwResizable - resizeable
    You can Set multiple options one after the other. They can also be reset to the defaults using "Send ClearWindowOptions".