| example report
When referencing the 'oe.orders.by.category.index' one of the index fields is 'comp.order.num'. The field, comp.order.num, consists of the order date joined to a dash joined to a zero-filled order number. For example: 19991231-0037. As you can see, this is not a standard date field. So, you cannot SELECT this field expecting to use a standard date field.
In order to make your report run efficiently, you need to:
ask for a beginning date and ignore the input (xx.b.order.date).
ask for an ending date and ignore the input (xx.e.order.date).
manipulate these dates and set up true beginning and ending comp.order.nums (/B.COMP.ORDER.NUM and /E.COMP.ORDER.NUM).
select on these user constructed comp.order.nums.
STEP 1: set up a 'start' macro.

This is the code for manipulating your beginning and ending date selects.
We take the xx.b.order.date field (which translates as c.xx.b.order.date), join it with "-0000" (the lowest order number possible) and place that into the field /B.COMP.ORDER.NUM.
We take the xx.e.order.date field (which translates as c.xx.e.order.date), join it with "-9999" (the highest order number possible) and place that into the field /E.COMP.ORDER.NUM.
STEP 2: SELECT your four date fields on Page 2 of Enter/Edit Report.

Selects 1 and 2 ask for the dummy dates (xx.b.order.date and xx.e.order.date) which are then manipulated in the 'start' macro. Note: the report writer translates these two variables as: c.xx.b.order.date and c.xx.e.order.date.
Selects 3 and 4 are the comp.order.nums you will SELECT on using the values you came up with in your macro (/B.COMP.ORDER.NUM and /E.COMP.ORDER.NUM). Since the value for these fields are preceeded by a slash (/), the SELECTs will not be asked for at run-time.
STEP 3: add the 'start' macro reference in the EDIT FOOTNOTES section on Page 3.

|