November 08, 2005, 12:16 PM
secretforcing by fields to exist
I have a report request to show 20 days of future scheduled production by item by schedule date. Sometimes the schedule dates do not exist in the data. The user wants all twenty dates to appear as a column on the report. Is there way to specify which BY fields will appear even if they don't exist in the data?
November 08, 2005, 12:52 PM
mgrackinUse the BY fieldname ROWS 'value' OVER 'value' OVER etc syntax.
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTRY ROWS
'ENGLAND' OVER
'JAPAN' OVER
'CHINA' OVER
'ITALY' OVER
'RUSSIA' OVER
'W GERMANY'
END
November 14, 2005, 06:41 AM
<JG>The thing to remember when using the ROWS/OVER Method is that if you are putting the data in to a hold file for additional processing then you must reference the column by it's ALIAS and not the original column name (in the example shown it will be E01) and that the length of the column is the maximum length of the ROWS/OVER values NOT the length of the original column.
JG
April 27, 2006, 12:19 PM
dballestHow do you do it without defining the value? In the above example, you know all the countries in the table. What if you don't know the values.
Thanks,
Dan
April 27, 2006, 12:22 PM
jimster06The MacGuyver technique comes to mind.
April 27, 2006, 12:45 PM
dballestjimster06,
Yes, I saw that mentioned in some other posts. I'll give that a try.
Thanks,
Dan