|Re: Reporting on current orders only
Mervyn Bick <email@example.com>
|Wed, 7 Feb 2024 08:57:38 +0200
On 2024/02/07 08:42, Craig wrote:
> I have just got dBase 2019 at work and we are trying to get a report that will show certain orders. We need the report to only show the orders that don't have invoice numbers in the database so that we can print those out for the month.
> I have been able to use the canRender function so that it only renders the specific orders that we want. But this still leaves the blank gaps between the orders where the criteria to render is not met. This will give a report that is a couple hundred pages long.
> How can I get it the the report only has the orders that are required. The issue I am having is that as soon as you add into your dbf file the report automatically asigns the number of bands that you will need. I only want that to happen when I run the report and only when the order has no invoice number
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"