|Re: Reporting on current orders only
Mervyn Bick <email@example.com>
|Wed, 7 Feb 2024 12:16:00 +0200
On 2024/02/07 08:57, Mervyn Bick wrote:
> The way to do this is make sure you only include the records you want in
> the rowset in the first place.
> Use a WHERE clause in the SQL SELECT statement in the report's query.
> Something along the lines of
> sql = "select * from whatever where inv_no = ' ' or inv_no is null"
Using a WHERE clause to limit records is using localSQL instead of
dBASE's own proprietary data manipulation language. localSQL is a
limited, but very useful, subset of "proper" SQL. You will find a
better looking version of the localSQL help file than that supplied with
dBASE at http://www.nknabe.dk/localsql/
If you've never used SQL, a good tutorial is at
https://www.w3schools.com/sql/ Bear in mind though that localSQL is a
subset of SQL so it can't do everything.
Instead of using localSQL and a WHERE clause you can also select all
records with 'select * from whatever' in the query and then use the
resulting rowset's canGetRecord event handler to only let those records
without an invoice number through.